|  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
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
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

Reproduce code:

Expected result:

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


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2007-11-21 17:42 UTC]
assign to self
 [2007-11-28 10:48 UTC]
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
Thank you for the report, and for helping us make PHP better.

PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Feb 23 01:01:30 2024 UTC