summaryrefslogtreecommitdiff
path: root/ext/simplexml/simplexml.c
diff options
context:
space:
mode:
authorAnatol Belski <ab@php.net>2016-03-08 12:59:59 +0100
committerAnatol Belski <ab@php.net>2016-03-08 12:59:59 +0100
commit8ca02bb233978493d9299a8abd29f01d1077bea6 (patch)
tree9bd0b25e75a09ace22fab65bc74ae4d7a82d5552 /ext/simplexml/simplexml.c
parent2d4ad66ff2e9f64e23461325f3c73bd5791653c2 (diff)
downloadphp-git-8ca02bb233978493d9299a8abd29f01d1077bea6.tar.gz
fix regression introduced in 5683b6fa39
Test extended. Basically, both iterator type and next node have to be checked.
Diffstat (limited to 'ext/simplexml/simplexml.c')
-rw-r--r--ext/simplexml/simplexml.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/ext/simplexml/simplexml.c b/ext/simplexml/simplexml.c
index af266348a3..07fc6546e8 100644
--- a/ext/simplexml/simplexml.c
+++ b/ext/simplexml/simplexml.c
@@ -1129,7 +1129,7 @@ static HashTable * sxe_get_prop_hash(zval *object, int is_debug TSRMLS_DC) /* {{
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;