php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #36743 Array data members behave incorrect when class inherits from builtin one.
Submitted: 2006-03-15 13:35 UTC Modified: 2006-03-17 11:18 UTC
From: maximgb at yandex dot ru Assigned:
Status: Closed Package: *XML functions
PHP Version: 5.1.2 OS: Windows XP SP2
Private report: No CVE-ID: None
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: maximgb at yandex dot ru
New email:
PHP Version: OS:

 

 [2006-03-15 13:35 UTC] maximgb at yandex dot ru
Description:
------------
Array data members behave incorrect when class inherits from builtin one. The first push to the member array is ignored, the other pushes work as usual.

Reproduce code:
---------------
class Test extends XMLReader
{
    private $testArr = array();

    public function __construct()
    {
        $this->testArr[] = 1;
        var_dump($this->testArr);
    }
}

Expected result:
----------------
array(1) {
   [0] => int(1)
}

Actual result:
--------------
array(0) {
}

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2006-03-15 13:47 UTC] tony2001@php.net
Reclassified as SimpleXML problem.
 [2006-03-15 13:59 UTC] tony2001@php.net
It should be "XMLReader", not "SimpleXML".
 [2006-03-17 11:18 UTC] tony2001@php.net
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
http://snaps.php.net/.
 
Thank you for the report, and for helping us make PHP better.


 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Nov 21 12:01:29 2024 UTC