Welcome Guest, Not a member yet? Register   Sign In
var_dump returns different results in the browser and via view source
#1

[eluser]CharleyW[/eluser]
I am doing a "var_dump" on four variables passed into a view via an array.

All four display properly on screen (i.e, string(5) "Texas" string(15) "Arlington - ISD" string(24) "The I Hate School School" string(3) "huh" ).

When I do a "View Source" in the browser, all four show as "bool(false)'. The values that show in the browser are not present.

???

Needless to say, the four variables don't get to where they're supposed to go (values of hidden fields on the form).

I have checked everything multiple times, I swear this is not one of those embarrassed oops moments ...

Thanks in advance for any help.
#2

[eluser]CharleyW[/eluser]
Update - this is a browser issue - works fine in Firefox and IE - Chrome seems (4.1) to be the culprit.
#3

[eluser]bhogg[/eluser]
A note that with Firefox anyway (not sure about Chrome), View Source can generate a new request. So, if re-fetching the data causes things to change, you won't see the original var_dump. A way to solve this is opening the View Source then doing a refresh (Ctrl or Cmd + R) to generate the first request instead of in the main browser window.
#4

[eluser]CharleyW[/eluser]
In other words, don't go to the bank on what "View Source" shows.

Thank you.
#5

[eluser]danmontgomery[/eluser]
upgrade to chrome 5 Tongue
#6

[eluser]CharleyW[/eluser]
I did last night. Same thing happens.




Theme © iAndrew 2016 - Forum software by © MyBB