com php-src: fixed whitespace dependend behavior of casting SimpleXMLElements to boolean: ext/simplexml/simplexml.c
| From: | Anatol Belski | Date: | Fri, 29 May 2015 18:43:38 +0000 |
| Subject: | com php-src: fixed whitespace dependend behavior of casting SimpleXMLElements to boolean: ext/simplexml/simplexml.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-86997@lists.php.net to get a copy of this message | ||
Commit: f27b9ead6bc660d09805466ff3ca6e3491eb3505
Author: Christoph M. Becker <cmbecker69@gmx.de> Tue, 26 May 2015 22:46:23 +0200
Committer: Anatol Belski <ab@php.net> Fri, 29 May 2015 20:43:38 +0200
Parents: 8e5b906459f362a6974c5337eabf257650b4a579
Branches: master
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=f27b9ead6bc660d09805466ff3ca6e3491eb3505
Log:
fixed whitespace dependend behavior of casting SimpleXMLElements to boolean
Changed paths:
M ext/simplexml/simplexml.c
Diff:
diff --git a/ext/simplexml/simplexml.c b/ext/simplexml/simplexml.c
index 18957d4..6bcf12e 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);