#32621 [Opn->Bgs]: isset() reports Fatal error on multidimensional arrays
| From: | tony2001@php.net | Date: | Thu, 07 Apr 2005 10:02:36 +0000 |
| Subject: | #32621 [Opn->Bgs]: isset() reports Fatal error on multidimensional arrays | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-76480@lists.php.net to get a copy of this message | ||
ID: 32621
Updated by: tony2001@php.net
Reported By: ivan_milaev at mail dot ru
-Status: Open
+Status: Bogus
Bug Type: Arrays related
Operating System: *
PHP Version: 5.0.4
New Comment:
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.
Previous Comments:
------------------------------------------------------------------------
[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