]> granicus.if.org Git - php/commitdiff
Merge branch 'PHP-5.6' into PHP-7.0
authorAnatol Belski <ab@php.net>
Tue, 8 Mar 2016 12:16:08 +0000 (13:16 +0100)
committerAnatol Belski <ab@php.net>
Tue, 8 Mar 2016 12:16:08 +0000 (13:16 +0100)
* PHP-5.6:
  fix regression introduced in 5683b6fa39

1  2 
ext/simplexml/simplexml.c

index 6152ec0f28d4b50b1fe52255cbc0b28f8d820539,07fc6546e896094aed794aea4691f0151774d955..8a1ef4915f2024925ab80334b809c691c2cc0196
@@@ -1183,13 -1129,13 +1183,13 @@@ static HashTable *sxe_get_prop_hash(zva
                        node = NULL;
                } else if (sxe->iter.type != SXE_ITER_CHILD) {
  
-                       if ( sxe->iter.type == SXE_ITER_NONE || !node->children || !node->parent || node->children->next || node->children->children || node->parent->children == node->parent->last ) {
+                       if ( sxe->iter.type == SXE_ITER_NONE || !node->children || !node->parent || !node->next || node->children->next || node->children->children || node->parent->children == node->parent->last ) {
                                node = node->children;
                        } else {
 -                              iter_data = sxe->iter.data;
 -                              sxe->iter.data = NULL;
 +                              ZVAL_COPY_VALUE(&iter_data, &sxe->iter.data);
 +                              ZVAL_UNDEF(&sxe->iter.data);
  
 -                              node = php_sxe_reset_iterator(sxe, 0 TSRMLS_CC);
 +                              node = php_sxe_reset_iterator(sxe, 0);
  
                                use_iter = 1;
                        }