|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #32621 isset() reports Fatal error on multidimensional arrays
Submitted: 2005-04-07 11:41 UTC Modified: 2005-04-07 12:17 UTC
From: ivan_milaev at mail dot ru Assigned:
Status: Not a bug Package: Arrays related
PHP Version: 5.0.4 OS: *
Private report: No CVE-ID: None
 [2005-04-07 11:41 UTC] ivan_milaev at mail dot ru
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:
var_dump(isset($arr['c1']['c2']['c3'])); // bool(false)
var_dump(isset($arr['c1']['c2']['c3']['c4'])); // Fatal error

Expected result:

Actual result:
Fatal error: Cannot use string offset as an array in ... on line 3


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2005-04-07 12:02 UTC]
Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at and the instructions on how to report
a bug at
Read the third entry.
 [2005-04-07 12:17 UTC] ivan_milaev at mail dot ru
But "isset($arr['c1']['c2']['c3'])" causes no error... and even no notice. Is this the bug than?
PHP Copyright © 2001-2022 The PHP Group
All rights reserved.
Last updated: Sat Jan 22 21:03:35 2022 UTC