#30786 [NEW]: print_r on a domtext Object

From: Date: Sun, 14 Nov 2004 22:09:03 +0000
Subject: #30786 [NEW]: print_r on a domtext Object
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-69054@lists.php.net to get a copy of this message
From: superzouz at hotmail dot com Operating system: Win XP SP2 PHP version: 4.3.9 PHP Bug Type: DOM XML related Bug description: print_r on a domtext Object Description: ------------ print_r on a domtext object whose content has been modified will still display the old content. Reproduce code: --------------- <pre> <?php dl("php_domxml.dll"); //for windows systems only $oXml = xmldoc('<one><two/><three>blah</three></one>'); $xpresult = xpath_eval(xpath_new_context($oXml), "/one/three"); $var = $xpresult->nodeset[0]->child_nodes(); $var[0]->set_content('hello'); echo($oXml->dump_mem()); print_r($var[0]); ?> </pre> Expected result: ---------------- <pre> <?xml version="1.0"?> <one><two/><three>hello</three></one> domtext Object ( [type] => 3 [name] => #text [content] => hello [0] => 4 [1] => 6475536 ) </pre> Actual result: -------------- <pre> <?xml version="1.0"?> <one><two/><three>hello</three></one> domtext Object ( [type] => 3 [name] => #text [content] => blah [0] => 4 [1] => 6475536 ) </pre> -- Edit bug report at http://bugs.php.net/?id=30786&edit=1 -- Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=30786&r=trysnapshot4 Try a CVS snapshot (php5.0): http://bugs.php.net/fix.php?id=30786&r=trysnapshot50 Try a CVS snapshot (php5.1): http://bugs.php.net/fix.php?id=30786&r=trysnapshot51 Fixed in CVS: http://bugs.php.net/fix.php?id=30786&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=30786&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=30786&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=30786&r=needscript Try newer version: http://bugs.php.net/fix.php?id=30786&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=30786&r=support Expected behavior: http://bugs.php.net/fix.php?id=30786&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=30786&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=30786&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=30786&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=30786&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=30786&r=dst IIS Stability: http://bugs.php.net/fix.php?id=30786&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=30786&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=30786&r=float MySQL Configuration Error: http://bugs.php.net/fix.php?id=30786&r=mysqlcfg

« previous php.bugs (#69054) next »