Skip to content

Commit f27b9ea

Browse files
cmb69weltling
authored andcommitted
fixed whitespace dependend behavior of casting SimpleXMLElements to boolean
1 parent 8e5b906 commit f27b9ea

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ext/simplexml/simplexml.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1066,7 +1066,7 @@ static int sxe_prop_is_empty(zval *object) /* {{{ */
10661066
if (node->type == XML_ATTRIBUTE_NODE) {
10671067
return 0;
10681068
} else if (sxe->iter.type != SXE_ITER_CHILD) {
1069-
if (!node->children || !node->parent || !node->next || node->children->next || node->children->children || node->parent->children == node->parent->last) {
1069+
if (sxe->iter.type == SXE_ITER_NONE || !node->children || !node->parent || node->children->next || node->children->children || node->parent->children == node->parent->last) {
10701070
node = node->children;
10711071
} else {
10721072
ZVAL_COPY_VALUE(&iter_data, &sxe->iter.data);

0 commit comments

Comments
 (0)