Edit report at https://bugs.php.net/bug.php?id=55223&edit=1

 ID:                 55223
 Updated by:         d...@php.net
 Reported by:        Sjon at hortensius dot net
 Summary:            isset triggers fatal error when accessing object as
                     array
-Status:             Open
+Status:             Bogus
 Type:               Bug
 Package:            Arrays related
 Operating System:   Archlinux
 PHP Version:        5.3.6
 Block user comment: N
 Private report:     N

 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




Previous Comments:
------------------------------------------------------------------------
[2011-07-20 16:07:14] binarycleric at gmail dot com

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.

------------------------------------------------------------------------
[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

Reply via email to