#32621 [Bgs]: isset() reports Fatal error on multidimensional arrays

From: Date: Thu, 07 Apr 2005 10:17:22 +0000
Subject: #32621 [Bgs]: isset() reports Fatal error on multidimensional arrays
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-76481@lists.php.net to get a copy of this message
ID: 32621 User updated by: ivan_milaev at mail dot ru Reported By: ivan_milaev at mail dot ru Status: Bogus Bug Type: Arrays related Operating System: * PHP Version: 5.0.4 New Comment: But "isset($arr['c1']['c2']['c3'])" causes no error... and even no notice. Is this the bug than? Previous Comments: ------------------------------------------------------------------------ [2005-04-07 12:02:34] tony2001@php.net Thank you for taking the time to write to us, but this is not a bug. Please double-check the documentation available at http://www.php.net/manual/ and the instructions on how to report a bug at http://bugs.php.net/how-to-report.php http://www.php.net/manual/en/migration5.incompatible.php Read the third entry. ------------------------------------------------------------------------ [2005-04-07 11:41:38] ivan_milaev at mail dot ru Description: ------------ php.ini-recomended is used isset() reports "Fatal error: Cannot use string offset as an array" when trying to check if the element of multidimensional array exists. Reproduce code: --------------- $arr['c1']='aaa'; var_dump(isset($arr['c1']['c2']['c3'])); // bool(false) var_dump(isset($arr['c1']['c2']['c3']['c4'])); // Fatal error Expected result: ---------------- bool(false) bool(false) Actual result: -------------- bool(false) Fatal error: Cannot use string offset as an array in ... on line 3 ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=32621&edit=1

« previous php.bugs (#76481) next »