From:             su1d at phpclub dot net
Operating system: Win32
PHP version:      5CVS-2004-06-29 (dev)
PHP Bug Type:     Reproducible crash
Bug description:  Crash on improper use of ArrayAccess

Description:
------------
I suppose this could be related with the bug #26675
(http://bugs.php.net/bug.php?id=26675).


Reproduce code:
---------------
<?php
class A implements ArrayAccess {
        function offsetGet($name) { return $this; }
        function offsetSet($name, $value) {}
        function offsetExists($name) { return true; }
        function offsetUnset($name) {}
}

$D = new A;
$D[]->something = 1;
?>

Expected result:
----------------
Actually, I'd like to see the offsetGet(null) to be called, but according
to the `hack` that solved the #26675, I suppose this should be:

Fatal error: Cannot use [] for reading in ...


Actual result:
--------------
*CRASH*


-- 
Edit bug report at http://bugs.php.net/?id=28957&edit=1
-- 
Try a CVS snapshot (php4):  http://bugs.php.net/fix.php?id=28957&r=trysnapshot4
Try a CVS snapshot (php5):  http://bugs.php.net/fix.php?id=28957&r=trysnapshot5
Fixed in CVS:               http://bugs.php.net/fix.php?id=28957&r=fixedcvs
Fixed in release:           http://bugs.php.net/fix.php?id=28957&r=alreadyfixed
Need backtrace:             http://bugs.php.net/fix.php?id=28957&r=needtrace
Need Reproduce Script:      http://bugs.php.net/fix.php?id=28957&r=needscript
Try newer version:          http://bugs.php.net/fix.php?id=28957&r=oldversion
Not developer issue:        http://bugs.php.net/fix.php?id=28957&r=support
Expected behavior:          http://bugs.php.net/fix.php?id=28957&r=notwrong
Not enough info:            http://bugs.php.net/fix.php?id=28957&r=notenoughinfo
Submitted twice:            http://bugs.php.net/fix.php?id=28957&r=submittedtwice
register_globals:           http://bugs.php.net/fix.php?id=28957&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=28957&r=php3
Daylight Savings:           http://bugs.php.net/fix.php?id=28957&r=dst
IIS Stability:              http://bugs.php.net/fix.php?id=28957&r=isapi
Install GNU Sed:            http://bugs.php.net/fix.php?id=28957&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=28957&r=float

Reply via email to