From: cbelin at free dot fr Operating system: Windows XP sp2 PHP version: 5.0.5 PHP Bug Type: SPL related Bug description: Method 'append()' in class extended from ArrayObject crash PHP
Description: ------------ Method 'append()' in class extended from ArrayObject crash PHP with Windows message (sorry, it's in French) : php-cgi.exe - Erreur d'application L'instruction à "0x10003cfb0" emploie l'adresse mémoire "0x00000008". La mémoire ne peut pas être "read". This bug only appears when method 'offsetSet()' is redefined. Web server IIS 5.1 under Windows XP Service Pack 2. Reproduce code: --------------- class Collection extends ArrayObject { public function add($dataArray) { foreach($dataArray as $value) $this->append($value); } public function offsetSet($index, $value) { parent::offsetSet($index, $value); } } $data1=array('one', 'two', 'three'); $data2=array('four', 'five'); $foo=new Collection($data1); $foo->add($data2); print_r($foo->getArrayCopy()); Expected result: ---------------- Array ( [0] => one [1] => two [2] => three [3] => four [4] => five ) Actual result: -------------- CGI Error The specified CGI application misbehaved by not returning a complete set of HTTP headers. The headers it did return are: (no headers are printed) -- Edit bug report at http://bugs.php.net/?id=34548&edit=1 -- Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=34548&r=trysnapshot4 Try a CVS snapshot (php5.0): http://bugs.php.net/fix.php?id=34548&r=trysnapshot50 Try a CVS snapshot (php5.1): http://bugs.php.net/fix.php?id=34548&r=trysnapshot51 Fixed in CVS: http://bugs.php.net/fix.php?id=34548&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=34548&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=34548&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=34548&r=needscript Try newer version: http://bugs.php.net/fix.php?id=34548&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=34548&r=support Expected behavior: http://bugs.php.net/fix.php?id=34548&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=34548&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=34548&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=34548&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=34548&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=34548&r=dst IIS Stability: http://bugs.php.net/fix.php?id=34548&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=34548&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=34548&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=34548&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=34548&r=mysqlcfg