|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2009-05-27 14:53 UTC] rrichards@php.net
[2009-06-04 01:00 UTC] php-bugs at lists dot php dot net
[2009-10-16 14:13 UTC] jeroen at tietema dot net
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Mon Oct 27 08:00:01 2025 UTC |
Description: ------------ DOMElement::setIdAttribute() is broken in 5.2.9. It works properly in 5.2.6. Reproduce code: --------------- <?php // php_dom_setidattribute_bug.php $obj_domDocument = new DOMDocument( ); $obj_domElement = $obj_domDocument->createElement( 'test', 'This is the root element!' ); $obj_domElement = $obj_domDocument->appendChild( $obj_domElement ); $obj_domElement->setAttribute( 'xml:id', 1 ); $obj_domElement->setIdAttribute( 'xml:id', TRUE ); print $obj_domDocument->saveXML( ); ?> Expected result: ---------------- This should not throw any exception. Actual result: -------------- PHP Fatal error: Uncaught exception 'DOMException' with message 'Not Found Error' in /home/gwp/bin/php_dom_setidattribute_bug.php:13 Stack trace: #0 /home/gwp/bin/php_dom_setidattribute_bug.php(13): DOMElement->setIdAttribute('xml:id', true) #1 {main} thrown in /home/gwp/bin/php_dom_setidattribute_bug.php on line 13 Fatal error: Uncaught exception 'DOMException' with message 'Not Found Error' in /home/gwp/bin/php_dom_setidattribute_bug.php:13