PHP 4.0 Bug #8139: NULL and isset
| From: | richard dot heyes at heyes-computing dot net | Date: | Wed, 06 Dec 2000 17:57:39 +0000 |
| Subject: | PHP 4.0 Bug #8139: NULL and isset | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-40233@lists.php.net to get a copy of this message | ||
From: richard.heyes@heyes-computing.net
Operating system: Linux
PHP version: 4.0.3pl1
PHP Bug Type: Scripting Engine problem
Bug description: NULL and isset
<?php
function foo(&$bar){
return TRUE;
}
foo($bar);
print($bar);
if(!isset($bar))
print('Bar is not set!');
?>
With notices turned on (error_reporting) the call to print($bar) does not throw an error. However
the bit below it runs the print() call. So if it's not set, the first print should throw an
error regarding the unset $bar. Seems very contradictory. FWIW the type of $bar after the call to
foo() is NULL.
--
Edit Bug report at: http://bugs.php.net/?id=8139&edit=1