diff options
author | Christoph M. Becker <cmbecker69@gmx.de> | 2015-05-26 22:46:23 +0200 |
---|---|---|
committer | Anatol Belski <ab@php.net> | 2015-05-29 20:43:38 +0200 |
commit | f27b9ead6bc660d09805466ff3ca6e3491eb3505 (patch) | |
tree | 69c6d04678a626b0be9e359e1e42d26f3fb57af0 | |
parent | 8e5b906459f362a6974c5337eabf257650b4a579 (diff) | |
download | php-git-f27b9ead6bc660d09805466ff3ca6e3491eb3505.tar.gz |
fixed whitespace dependend behavior of casting SimpleXMLElements to boolean
-rw-r--r-- | ext/simplexml/simplexml.c | 2 |
1 files changed, 1 insertions, 1 deletions
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); |