#37199 [NEW]: XMLReader doesnt accept array properties
| From: | evert at collab dot nl | Date: | Tue, 25 Apr 2006 15:24:03 +0000 |
| Subject: | #37199 [NEW]: XMLReader doesnt accept array properties | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-96218@lists.php.net to get a copy of this message | ||
From: evert at collab dot nl
Operating system: Slackware 10
PHP version: 5.1.2
PHP Bug Type: *XML functions
Bug description: XMLReader doesnt accept array properties
Description:
------------
When i create a new class, derived from XMLReader and I add new (private)
properties it works perfectly for simple values (int, string), but when I
use arrays, it simply forgets the value.
Reproduce code:
---------------
<?php
class MyReader extends XMLReader {
private $test;
private $arr = array();
public function test() {
// Adding a normal variable works just fine:
$this->test = 'test';
echo($this->test);
// But an array.. is a different story
$this->arr[0] = '1';
print_r($this->arr);
die();
}
}
$v = new MyReader();
$v->test();
?>
Expected result:
----------------
testArray(0=>'1')
or something along those lines
Actual result:
--------------
testArray()
--
Edit bug report at http://bugs.php.net/?id=37199&edit=1
--
Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=37199&r=trysnapshot44
Try a CVS snapshot (PHP 5.1): http://bugs.php.net/fix.php?id=37199&r=trysnapshot51
Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=37199&r=trysnapshot60
Fixed in CVS: http://bugs.php.net/fix.php?id=37199&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=37199&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=37199&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=37199&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=37199&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=37199&r=support
Expected behavior: http://bugs.php.net/fix.php?id=37199&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=37199&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=37199&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=37199&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=37199&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=37199&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=37199&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=37199&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=37199&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=37199&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=37199&r=mysqlcfg