Re: DOMElement->setAttribute() loops forever (node_list_unlink bug?)
| From: | Rob Richards | Date: | Mon, 15 May 2006 23:50:47 +0000 |
| Subject: | Re: DOMElement->setAttribute() loops forever (node_list_unlink bug?) | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-236239@lists.php.net to get a copy of this message | ||
Riku Palomäki wrote:
Hello, I'm having problems with DOMElement->setAttribute() -method with my php script. I stripped down the code to this: ---------------------- $doc = new DOMDocument(); $doc->resolveExternals = true; $doc->loadXml('<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><a b="" />'); $root = $doc->getElementsByTagName('a')->item(0); $root->setAttribute('b', '>'); $root->setAttribute('b', ''); // This will never be executed echo "done\n"; ----------------------Can you please bug this (no need for the backtrace), so I don't forget it. I see the problem but will take me a day or two to get around to fix. As a work around for now you can do: $root->setAttributeNode(new DOMAttr('b', '>')); $root->setAttribute('b', ''); Rob