summaryrefslogtreecommitdiff
path: root/ext/simplexml/simplexml.c
diff options
context:
space:
mode:
Diffstat (limited to 'ext/simplexml/simplexml.c')
-rw-r--r--ext/simplexml/simplexml.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/ext/simplexml/simplexml.c b/ext/simplexml/simplexml.c
index 5c7cd60e5c..04fc95ea06 100644
--- a/ext/simplexml/simplexml.c
+++ b/ext/simplexml/simplexml.c
@@ -1396,15 +1396,12 @@ SXE_METHOD(getNamespaces)
GET_NODE(sxe, node);
node = php_sxe_get_first_node(sxe, node TSRMLS_CC);
- while (node) {
- SKIP_TEXT(node)
+ if (node) {
if (node->type == XML_ELEMENT_NODE) {
sxe_add_namespaces(sxe, node, recursive, return_value TSRMLS_CC);
} else if (node->type == XML_ATTRIBUTE_NODE && node->ns) {
sxe_add_namespace_name(return_value, node->ns);
}
-next_iter:
- node = node->next;
}
}
/* }}} */