From b4ad6bbc8259e7da4bad8733701cc2eb973fd766 Mon Sep 17 00:00:00 2001 From: Marcus Boerger Date: Sun, 30 Oct 2005 00:38:39 +0000 Subject: [PATCH] - Protect against some edge case that is currently imossible, but will be --- ext/simplexml/simplexml.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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) { -- 2.50.1