]> granicus.if.org Git - php/commitdiff
fixed whitespace depending (mis)behavior of var_dump'ing and print_r'ing SimpleXMLEle...
authorChristoph M. Becker <cmbecker69@gmx.de>
Tue, 26 May 2015 16:35:09 +0000 (18:35 +0200)
committerAnatol Belski <ab@php.net>
Fri, 29 May 2015 18:43:34 +0000 (20:43 +0200)
ext/simplexml/simplexml.c

index 7a9775b752e65a2b5560a4d9f18d36e3fa50805b..18957d4fcba186a9575ede597883a9b156a9de4d 100644 (file)
@@ -1186,7 +1186,7 @@ static HashTable *sxe_get_prop_hash(zval *object, int is_debug) /* {{{ */
                        node = NULL;
                } else if (sxe->iter.type != SXE_ITER_CHILD) {
 
-                       if ( !node->children || !node->parent || !node->next || node->children->next || node->children->children || node->parent->children == node->parent->last ) {
+                       if ( sxe->iter.type == SXE_ITER_NONE || !node->children || !node->parent || node->children->next || node->children->children || node->parent->children == node->parent->last ) {
                                node = node->children;
                        } else {
                                ZVAL_COPY_VALUE(&iter_data, &sxe->iter.data);