]> granicus.if.org Git - php/commitdiff
- Protect against some edge case that is currently imossible, but will be
authorMarcus Boerger <helly@php.net>
Sun, 30 Oct 2005 00:38:39 +0000 (00:38 +0000)
committerMarcus Boerger <helly@php.net>
Sun, 30 Oct 2005 00:38:39 +0000 (00:38 +0000)
ext/simplexml/simplexml.c

index 2066f5fbf87b6a7ee9b3c83142fdc1a14f11e5fe..f83714c1634c58071ac07d9bd31a3f3534cf19c2 100644 (file)
@@ -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) {