|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2004-04-26 20:37 UTC] helly@php.net
[2007-09-25 11:24 UTC] ofih at fhd dot ko
[2012-03-23 17:01 UTC] nikic@php.net
[2012-03-23 17:01 UTC] nikic@php.net
-Status: Suspended
+Status: Closed
-Package: Feature/Change Request
+Package: *General Issues
|
|||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Fri Nov 28 15:00:02 2025 UTC |
Description: ------------ $a = 'asdf'; echo is_array($a['foo']['asdf']); is completly invalid, unfortunatly many applications deal with the fact that some offsets simply "may" not exist. workaround would be if (isset($a['foo']['asdf']) && is_array($a['foo']['asdf']) { .... but this would bloat the code a lot Reproduce code: --------------- // /* E_ERROR Invalid offset */ $a = 'asdf'; echo is_array($a['foo']['asdf']); Expected result: ---------------- an E_WARNING instead of E_ERROR which is suppressable Actual result: -------------- E_ERROR