diff options
Diffstat (limited to 'ext/dom/php_dom.c')
-rw-r--r-- | ext/dom/php_dom.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/ext/dom/php_dom.c b/ext/dom/php_dom.c index ea6f1953ff..89d1d3bf53 100644 --- a/ext/dom/php_dom.c +++ b/ext/dom/php_dom.c @@ -1326,6 +1326,14 @@ void dom_normalize (xmlNodePtr nodep) break; } } + strContent = xmlNodeGetContent(child); + if (*strContent == '\0') { + nextp = child->next; + xmlUnlinkNode(child); + php_libxml_node_free_resource(child); + child = nextp; + continue; + } break; case XML_ELEMENT_NODE: dom_normalize (child); |