Re: DOMElement->setAttribute() loops forever (node_list_unlink bug?)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Rob Richards wrote:
> 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', '&gt;');
>> $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', '&gt;'));
> $root->setAttribute('b', '');

Ok, http://bugs.php.net/37456


-- 
Riku

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux