summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ext/simplexml/simplexml.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/ext/simplexml/simplexml.c b/ext/simplexml/simplexml.c
index 8d19513129..c1b719814d 100644
--- a/ext/simplexml/simplexml.c
+++ b/ext/simplexml/simplexml.c
@@ -50,7 +50,7 @@ _node_as_zval(php_sxe_object *sxe, xmlNodePtr node, zval *value)
char *contents;
contents = xmlNodeListGetString(sxe->document, node->xmlChildrenNode, 1);
- if (contents) {
+ if (!xmlIsBlankNode(node->xmlChildrenNode) && contents) {
ZVAL_STRING(value, contents, 1);
xmlFree(contents);
} else {