#36743 [Opn->Csd]: Array data members behave incorrect when class inherits from builtin one.
| From: | tony2001@php.net | Date: | Fri, 17 Mar 2006 10:18:33 +0000 |
| Subject: | #36743 [Opn->Csd]: Array data members behave incorrect when class inherits from builtin one. | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-94457@lists.php.net to get a copy of this message | ||
ID: 36743
Updated by: tony2001@php.net
Reported By: maximgb at yandex dot ru
-Status: Open
+Status: Closed
Bug Type: *XML functions
Operating System: Windows XP SP2
PHP Version: 5.1.2
New Comment:
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.
Previous Comments:
------------------------------------------------------------------------
[2006-03-15 13:59:45] tony2001@php.net
It should be "XMLReader", not "SimpleXML".
------------------------------------------------------------------------
[2006-03-15 13:47:28] tony2001@php.net
Reclassified as SimpleXML problem.
------------------------------------------------------------------------
[2006-03-15 13:35:43] 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) {
}
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=36743&edit=1