From: Anatol Belski Date: Tue, 8 Mar 2016 12:16:08 +0000 (+0100) Subject: Merge branch 'PHP-5.6' into PHP-7.0 X-Git-Tag: php-7.0.5RC1~13 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=7a4c2fa829bc5a5ae731febe2cf7a74167012e37;p=php Merge branch 'PHP-5.6' into PHP-7.0 * PHP-5.6: fix regression introduced in 5683b6fa39 --- 7a4c2fa829bc5a5ae731febe2cf7a74167012e37 diff --cc ext/simplexml/simplexml.c index 6152ec0f28,07fc6546e8..8a1ef4915f --- a/ext/simplexml/simplexml.c +++ b/ext/simplexml/simplexml.c @@@ -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; }