From: Marcus Boerger Date: Sun, 30 Oct 2005 00:38:39 +0000 (+0000) Subject: - Protect against some edge case that is currently imossible, but will be X-Git-Tag: RELEASE_2_0_1~112 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=b4ad6bbc8259e7da4bad8733701cc2eb973fd766;p=php - Protect against some edge case that is currently imossible, but will be --- diff --git a/ext/simplexml/simplexml.c b/ext/simplexml/simplexml.c index 2066f5fbf8..f83714c163 100644 --- a/ext/simplexml/simplexml.c +++ b/ext/simplexml/simplexml.c @@ -1568,7 +1568,7 @@ zend_object_iterator_funcs php_sxe_iterator_funcs = { static void php_sxe_iterator_fetch(php_sxe_object *sxe, xmlNodePtr node TSRMLS_DC) { char *prefix = sxe->iter.nsprefix; - int test_elem = sxe->iter.type == SXE_ITER_ELEMENT; + int test_elem = sxe->iter.type == SXE_ITER_ELEMENT && sxe->iter.name; int test_attr = sxe->iter.type == SXE_ITER_ATTRLIST && sxe->iter.name; while (node) {