|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2003-07-22 08:50 UTC] zeev@php.net
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Wed Nov 19 19:00:01 2025 UTC |
Description: ------------ When checking variables either not declared or after having unset() them with empty() or isset(), some errors occure. In former times, empty() and isset() have not produced errors - even if it is a NOTICE now. -> hopefully this is not the way it is meant to be - I think, than it's not only me who has to rewrite his code Reproduce code: --------------- class test { function __construct() { if (empty($this->test[0][0])) { print "test1";} if (!isset($this->test[0][0])) { print "test2";} } } $test1 = new test(); Expected result: ---------------- test1test2 Actual result: -------------- Notice: Undefined property: test::$test in D:\inetpub\wwwroot\fmwars\temp.php on line 41 test1Notice: Undefined property: test::$test in D:\inetpub\wwwroot\fmwars\temp.php on line 42 test2