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] [EMAIL PROTECTED] 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
