cvs: php4 /ext/domxml php_domxml.c

From: Date: Wed, 14 Aug 2002 07:29:47 +0000
Subject: cvs: php4 /ext/domxml php_domxml.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-13342@lists.php.net to get a copy of this message
chregu Wed Aug 14 03:29:47 2002 EDT Modified files: /php4/ext/domxml php_domxml.c Log: @ - DomNode->child_nodes() returns empty array instead of false, if no @ - child nodes are found (chregu) Index: php4/ext/domxml/php_domxml.c diff -u php4/ext/domxml/php_domxml.c:1.185 php4/ext/domxml/php_domxml.c:1.186 --- php4/ext/domxml/php_domxml.c:1.185 Mon Aug 12 09:11:50 2002 +++ php4/ext/domxml/php_domxml.c Wed Aug 14 03:29:46 2002 @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_domxml.c,v 1.185 2002/08/12 13:11:50 chregu Exp $ */ +/* $Id: php_domxml.c,v 1.186 2002/08/14 07:29:46 chregu Exp $ */ /* TODO * - Support Notation Nodes @@ -2258,19 +2258,18 @@ 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; + } } } /* }}} */

« previous php.cvs (#13342) next »