From: ppetermann at vivaplus dot tv Operating system: tested on Linux and Solaris PHP version: 5CVS-2005-02-25 (dev) PHP Bug Type: DOM XML related Bug description: foreach on $dom->documentElement->childNode causes strange error
Description: ------------ doing a foreach loop on: $dom->documentElement->childNode causes an Fatal Error: Fatal error: Cannot access undefined property for object with overloaded property access in FILE on line LINENUMBEROFFOREACH this didnt happen in PHP5 <= 5.0.3 Reproduce code: --------------- <?php $dom = new DomDocument(); $dom->load("xmlfile.xml); foreach($dom->documentElement->childNode as $node) { echo "foo\n"; } ?> Expected result: ---------------- a foo\n for each childnode of the document element Actual result: -------------- Fatal error: Cannot access undefined property for object with overloaded property access in /foo/bar/myfile.php on line 4 -- Edit bug report at http://bugs.php.net/?id=32104&edit=1 -- Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=32104&r=trysnapshot4 Try a CVS snapshot (php5.0): http://bugs.php.net/fix.php?id=32104&r=trysnapshot50 Try a CVS snapshot (php5.1): http://bugs.php.net/fix.php?id=32104&r=trysnapshot51 Fixed in CVS: http://bugs.php.net/fix.php?id=32104&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=32104&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=32104&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=32104&r=needscript Try newer version: http://bugs.php.net/fix.php?id=32104&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=32104&r=support Expected behavior: http://bugs.php.net/fix.php?id=32104&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=32104&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=32104&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=32104&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=32104&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=32104&r=dst IIS Stability: http://bugs.php.net/fix.php?id=32104&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=32104&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=32104&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=32104&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=32104&r=mysqlcfg