|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #34548 Method 'append()' in class extended from ArrayObject crash PHP
Submitted: 2005-09-19 13:29 UTC Modified: 2005-09-19 21:02 UTC
Avg. Score:3.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:0 (0.0%)
Same OS:1 (100.0%)
From: cbelin at free dot fr Assigned: tony2001 (profile)
Status: Closed Package: SPL related
PHP Version: 5.0.5 OS: Windows XP sp2
Private report: No CVE-ID: None
 [2005-09-19 13:29 UTC] cbelin at free dot fr
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);


Expected result:
    [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)


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2005-09-19 13:51 UTC]
Please try using this CVS snapshot:
For Windows:

Works fine for me (using Linux).

 [2005-09-19 14:03 UTC]
Works fine with 5.1, reproducible with 5.0.
I got a patch for it, will check it out with Marcus and commit soon. 

 [2005-09-19 21:02 UTC]
This bug has been fixed in CVS.

Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
Thank you for the report, and for helping us make PHP better.

PHP Copyright © 2001-2023 The PHP Group
All rights reserved.
Last updated: Mon Dec 11 20:01:29 2023 UTC