Bug #15825: isset() raises warning for undefined class property

From: Date: Sat, 02 Mar 2002 03:32:03 +0000
Subject: Bug #15825: isset() raises warning for undefined class property
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-1448@lists.php.net to get a copy of this message
From: yohgaki@php.net Operating system: ANY PHP version: 4.0CVS-2002-03-01 PHP Bug Type: Variables related Bug description: isset() raises warning for undefined class property 4.0..x does not raise error, but 4.1.x does. <?php error_reporting(E_ALL); class testclass { var $dd = ""; } $test = new testclass(); if (isset($test->dd[0])){ echo "(A) TRUE \n"; }else{ echo "(A) FALSE \n"; } if (is_array($test->dd) && isset($test->dd[0])){ echo "(B) TRUE \n"; }else{ echo "(B) FALSE \n"; } ?> -- Edit bug report at http://bugs.php.net/?id=15825&edit=1 -- Fixed in CVS: http://bugs.php.net/fix.php?id=15825&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=15825&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=15825&r=needtrace Try newer version: http://bugs.php.net/fix.php?id=15825&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=15825&r=support Expected behavior: http://bugs.php.net/fix.php?id=15825&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=15825&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=15825&r=submittedtwice

« previous php.bugs (#1448) next »