From: Christoph M. Becker Date: Tue, 26 May 2015 20:46:23 +0000 (+0200) Subject: fixed whitespace dependend behavior of casting SimpleXMLElements to boolean X-Git-Tag: PRE_PHP7_NSAPI_REMOVAL~3 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=f27b9ead6bc660d09805466ff3ca6e3491eb3505;p=php fixed whitespace dependend behavior of casting SimpleXMLElements to boolean --- diff --git a/ext/simplexml/simplexml.c b/ext/simplexml/simplexml.c index 18957d4fcb..6bcf12ea86 100644 --- a/ext/simplexml/simplexml.c +++ b/ext/simplexml/simplexml.c @@ -1066,7 +1066,7 @@ static int sxe_prop_is_empty(zval *object) /* {{{ */ if (node->type == XML_ATTRIBUTE_NODE) { return 0; } 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);