I must be doing something blindingly stupid, but I just cannot see it. No matter what I try the value of one of my variables stubbornly remains null when it should be a string. The following is some debugging code that I inserted right after the first initialization of the vairable because the value of the variable $notes was unexpectedly null, when it should have been a string.
Code: Select all
$notes = $event->getDesc(); // last line of existing code
if ($notes == null)
{ // this should not occur
print "<p>\$notes=null</p>"; // report the problem in the web page
$notes = ""; // force the value to a zero-length string
if ($notes == null) // check that the force worked
print "<p>\$notes still null</p>"; // but it didn't because I see this second message!
} // this should not occur
I tried changing the name of the variable in case there was something sensitive to that, but nothing worked.