RE: [PHP-DEV] PHP 4.0 Bug #8139 Updated: NULL and isset

From: Date: Thu, 07 Dec 2000 10:28:29 +0000
Subject: RE: [PHP-DEV] PHP 4.0 Bug #8139 Updated: NULL and isset
Groups: php.dev 
Request: Send a blank email to php-dev+get-40347@lists.php.net to get a copy of this message
> -----Original Message----- > From: Richard Heyes [mailto:php@heyes-computing.net] > Sent: Thursday, December 07, 2000 10:26 > To: Sam Liddicott > Cc: php-dev@lists.php.net > Subject: RE: [PHP-DEV] PHP 4.0 Bug #8139 Updated: NULL and isset > > > > > ID: 8139 > > > User Update by: richard.heyes@heyes-computing.net > > > Old-Status: Feedback > > > Status: Open > > > Bug Type: Scripting Engine problem > > > Description: NULL and isset > > > > > Surely if passing an unset variable by reference doesn't > work as the first > > guy indicated, and if the user were trying to set a mysql handle > > as in your > > case, they would want to be warned if it didn't work > (likely they had > > mis-spelled the variable). > > Well I was the first guy. :) I wasn't referring to passing by > reference not > working, but what happens afterwards when the variable that > was passed in > is: > > a. Initially unset > b. Not used inside the function. > > After being passed by reference and unused (Admittedly a > rather strange > situation) the variable is of type NULL. This would suggest > that it's set, > and when printing the variable this seems to ring true (by > not issuing a > notice). But when testing with isset() it fails, > contradicting what print() > has just claimed. Right. I guess I usually have warnings turned off; I'm used to undefined variables not raising an error. Sam

« previous php.dev (#40347) next »