Edit report at https://bugs.php.net/bug.php?id=55223&edit=1
ID: 55223
Comment by: binarycleric at gmail dot com
Reported by: Sjon at hortensius dot net
Summary: isset triggers fatal error when accessing object as
array
Status: Open
Type: Bug
Package: Arrays related
Operating System: Archlinux
PHP Version: 5.3.6
Block user comment: N
Private report: N
New Comment:
It's not isset that's triggering this error. The reason is that "$x['a']" is
not
valid when $x is an object.
Just for (cheap and lazy) regression purposes I tried this on PHP 5.2.17 and
the
same thing occurred so I don't think #53971 had anything to do with it.
Previous Comments:
------------------------------------------------------------------------
[2011-07-18 04:09:18] Sjon at hortensius dot net
Description:
------------
This worked for quite a long time, but stopped working recently, I suspect due
to
#53971 being fixed. I think isset should never trigger any error
Test script:
---------------
$x = new stdClass;
$x->a = 'b';
var_dump(isset($x['a']));
Expected result:
----------------
false
Actual result:
--------------
PHP Fatal error: Cannot use object of type stdClass as array in php shell code
on line 1
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=55223&edit=1