1
0
mirror of https://github.com/php/php-src.git synced 2026-04-26 17:38:14 +02:00

@ - DomNode->child_nodes() returns empty array instead of false, if no

@ - child nodes are found (chregu)
This commit is contained in:
Christian Stocker
2002-08-14 07:29:46 +00:00
parent 3df8889c0b
commit 43bdd6ed73
+8 -9
View File
@@ -2258,19 +2258,18 @@ PHP_FUNCTION(domxml_node_children)
last = ((xmlDoc *) nodep)->children;
else
last = nodep->children;
if (!last) {
RETURN_FALSE;
}
if (array_init(return_value) == FAILURE) {
RETURN_FALSE;
}
while (last) {
zval *child;
child = php_domobject_new(last, &ret, NULL TSRMLS_CC);
add_next_index_zval(return_value, child);
last = last->next;
if (last) {
while (last) {
zval *child;
child = php_domobject_new(last, &ret, NULL TSRMLS_CC);
add_next_index_zval(return_value, child);
last = last->next;
}
}
}
/* }}} */