"Murphy was an optimist!"
Today’s Programming Challenge November 7, 2008 12:06 pm
Posted by Doug McCaughan in : PHP, Programming, TechnologyI am working on a PHP application that is mysteriously losing the value of a particular session variable. There is only one place in all the code that the variable is set. All comparisons have been confirmed as comparison operators == instead of assignment =. In debugging a vardump shows the variable as:
[“foo”]=> &string(2) “35”
and a second later it becomes
[“foo”]=> ∫(35).
Does the ∫ symbol mean undefined? And if so, why does it still show the value? echo “***”.$_SESSION[‘foo’].”***” shows ****** in the later instance and ***35*** in the previous.
Ah ha! It’s the integral symbol. I just didn’t expect to see that in debugging. Why is my string suddenly an integral?
Update: From the notes on vardump "Now ∫ translates into an integral sign, and since the browser may be inclined to overlook the missing semicolon, you may be seeing integrals where you were expecting &int"
Update: Solved. A locally scoped variable of the same name was being set to null. I’m still unclear on why the session variable would assume the value of the locally scoped variable.
add a commentWordPress 2.5 post by email broken April 8, 2008 7:04 am
Posted by Doug McCaughan in : Blog, Publishing, Software, Technology, WordPressYesterday when Comcast was down for scheduled maintenance I tried to blog it by sending an email from my phone to Reality Me via a secret email that WordPress checks once an hour. I actually sent two posts via email and neither were ever seen on the blog. I just found both the posts with a "pending review" status. This seems to be a new behavior in WordPress 2.5 and not a feature that I like. There does not appear to be a setting that allows me to change this behavior. Perhaps it is my turn to write a plugin.
I think having the ability to post by email when I cannot otherwise reach the blog is a powerful feature. Having the post hidden from publication by slapping it into a pending review status makes posting by email a bit useless, at least for my purposes.
14comments