php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #18395 DOMXML crash on removing previously created attributes
Submitted: 2002-07-17 13:52 UTC Modified: 2002-08-14 04:28 UTC
Votes:1
Avg. Score:3.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:1 (100.0%)
Same OS:0 (0.0%)
From: flying at dom dot natm dot ru Assigned:
Status: Closed Package: DOM XML related
PHP Version: 4CVS-2002-07-17 OS: Windows 2000
Private report: No CVE-ID: None
 [2002-07-17 13:52 UTC] flying at dom dot natm dot ru
DOMXML module crashes on call remove_attribute() method for a node, which was previously created by for example set_attribute().
 Take a look at the following example:

<?php
$xml = xmldoc('<root a1="b1"/>');
$root = $xml->root();
$root->set_attribute('a2','b2');
$root->remove_attribute('a1');
$root->remove_attribute('a2');
echo htmlspecialchars($xml->dumpmem());
?>

Removing "a1" attribute is ok because it was defined in XML document on parse time. But removing of "a2" attribute causes PHP to crash.

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-08-14 03:10 UTC] chregu@php.net
I can reproduce it on Linux. I'll try to have a look at it soon.

chregu
 [2002-08-14 04:28 UTC] chregu@php.net
This bug has been fixed in CVS. You can grab a snapshot of the
CVS version at http://snaps.php.net/. In case this was a documentation 
problem, the fix will show up soon at http://www.php.net/manual/.
In case this was a PHP.net website problem, the change will show
up on the PHP.net site and on the mirror sites.
Thank you for the report, and for helping us make PHP better.


 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Mon May 06 19:01:32 2024 UTC