ID: 31436 Updated by: [EMAIL PROTECTED] Reported By: joshdf at gmail dot com -Status: Verified +Status: Bogus Bug Type: Zend Engine 2 problem Operating System: * PHP Version: 5CVS-2004-01-10 New Comment:
Please do not submit the same bug more than once. An existing bug report already describes this very problem. Even if you feel that your issue is somewhat different, the resolution is likely to be the same. Thank you for your interest in PHP. See bug #31098 Previous Comments: ------------------------------------------------------------------------ [2005-01-07 02:09:37] joshdf at gmail dot com Description: ------------ isset may return true to a $string->member being passed in. Clearly, a string can not have a member variable; therefore, isset is expected to always return false in this case. The actual result of the reproduced code for us is incorrect when using php 5.0.3, while the expected correct result is produced in php 5.0.0. Reproduce code: --------------- <?php class Car { var $mpg; } $car = new Car(); $car->mpg = 30; //the normal case, should work if( isset($car->mpg) ) echo "mpg is set...this is normal<br>"; //the case that may not work right: $some_random_string = "this is some random string, it has no mpg member"; if( isset($some_random_string->mpg) ) echo "ERROR: This line should never be displayed<br>"; ?> Expected result: ---------------- mpg is set...this is normal Actual result: -------------- mpg is set...this is normal ERROR: This line should never be displayed ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=31436&edit=1