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

From: Date: Sat, 02 Mar 2002 11:04:36 +0000
Subject: Bug #15825 Updated: isset() raises warning for undefined class property
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-1460@lists.php.net to get a copy of this message
ID: 15825 Updated by: derick@php.net Reported By: yohgaki@php.net -Status: Analyzed +Status: Closed Bug Type: Variables related Operating System: ANY PHP Version: 4.0CVS-2002-03-0 New Comment: There is nothing wrong here, it prints "PHP Notice: Uninitialized string offset: 0 in - on line 5" for me, which it should. Derick Previous Comments: ------------------------------------------------------------------------ [2002-03-01 22:32:40] yohgaki@php.net Should be fixed before 4.2.0, IMO ------------------------------------------------------------------------ [2002-03-01 22:32:03] yohgaki@php.net 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 this bug report at http://bugs.php.net/?id=15825&edit=1

« previous php.bugs (#1460) next »