php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #43364 using recursive xincludes doesn't remove internal xml nodes properly
Submitted: 2007-11-21 16:21 UTC Modified: 2007-11-28 10:48 UTC
Votes:4
Avg. Score:4.8 ± 0.4
Reproduced:4 of 4 (100.0%)
Same Version:2 (50.0%)
Same OS:2 (50.0%)
From: ddb at bitxtender dot de Assigned: rrichards (profile)
Status: Closed Package: DOM XML related
PHP Version: 5.3CVS-2007-11-21 (CVS) OS: Mac OS X
Private report: No CVE-ID: None
 [2007-11-21 16:21 UTC] ddb at bitxtender dot de
Description:
------------
libxml creates XML_XINCLUDE_START and XML_XINCLUDE_END nodes when 
inserting the referenced node(s). When using x:include in a part which 
will be x:included by some other part this will create nested 
XML_INCLUDE_* nodes but php doesn't descend into child nodes between 
XML_XINCLUDE_START and XML_XINCLUDE_END so only the top level 
XML_INCLUDE nodes get removed

a patch fixing this is available at 
http://agavi.org/php/xinclude_bug.patch

Reproduce code:
---------------
http://www.agavi.org/php/xinclude_bug.phps

Expected result:
----------------
OK

Actual result:
--------------
PHP Warning:  loopElements(): Unsupported node type: 19 in 
/Users/dominik/Desktop/xinclude_bug.php on line 26

Warning: loopElements(): Unsupported node type: 19 in 
/Users/dominik/Desktop/xinclude_bug.php on line 26
Segmentation fault

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2007-11-21 17:42 UTC] rrichards@php.net
assign to self
 [2007-11-28 10:48 UTC] rrichards@php.net
This bug has been fixed in CVS.

Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.
 
Thank you for the report, and for helping us make PHP better.


 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Tue Mar 19 03:01:29 2024 UTC