ID: 31098
Comment by: ptchristendom at yahoo dot com
Reported By: jyounger at caedic dot com
Status: Open
Bug Type: Zend Engine 2 problem
Operating System: Slackare Linux Kernel 2.4.26
PHP Version: 5.0.3
New Comment:
Empty() has the same problem.
<?php
$simpleString = "Bogus String Text";
var_dump(empty($simpleString->nonExistentStringProperty));
?>
Previous Comments:
------------------------------------------------------------------------
[2004-12-15 17:27:33] jyounger at caedic dot com
Description:
------------
isset() when run using mod_php returns a false positive when checking a
string variable for the presence of a property. isset() when run under
the cli behaves correctly and returns false. This is in PHP 5.0.3RC2.
Reproduce code:
---------------
<?php
$simpleString = "Bogus String Text";
if (isset($simpleString->nonExistentStringProperty)) {
echo "This line should not execute";
} else {
echo "This line should execute";
}
?>
Expected result:
----------------
This line should execute
Actual result:
--------------
This line should not execute
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=31098&edit=1