iliaa Tue, 07 Jun 2011 01:40:54 +0000
Revision: http://svn.php.net/viewvc?view=revision&revision=311874
Log:
Fixed test 008
Changed paths:
U php/php-src/branches/PHP_5_3/ext/simplexml/simplexml.c
U php/php-src/branches/PHP_5_4/ext/simplexml/simplexml.c
U php/php-src/trunk/ext/simplexml/simplexml.c
Modified: php/php-src/branches/PHP_5_3/ext/simplexml/simplexml.c
===================================================================
--- php/php-src/branches/PHP_5_3/ext/simplexml/simplexml.c 2011-06-07
01:27:29 UTC (rev 311873)
+++ php/php-src/branches/PHP_5_3/ext/simplexml/simplexml.c 2011-06-07
01:40:54 UTC (rev 311874)
@@ -1264,9 +1264,8 @@
result = retval->nodesetval;
- array_init(return_value);
-
if (result != NULL) {
+ array_init(return_value);
for (i = 0; i < result->nodeNr; ++i) {
nodeptr = result->nodeTab[i];
if (nodeptr->type == XML_TEXT_NODE || nodeptr->type ==
XML_ELEMENT_NODE || nodeptr->type == XML_ATTRIBUTE_NODE) {
@@ -1287,6 +1286,8 @@
add_next_index_zval(return_value, value);
}
}
+ } else {
+ RETVAL_FALSE;
}
xmlXPathFreeObject(retval);
Modified: php/php-src/branches/PHP_5_4/ext/simplexml/simplexml.c
===================================================================
--- php/php-src/branches/PHP_5_4/ext/simplexml/simplexml.c 2011-06-07
01:27:29 UTC (rev 311873)
+++ php/php-src/branches/PHP_5_4/ext/simplexml/simplexml.c 2011-06-07
01:40:54 UTC (rev 311874)
@@ -1294,9 +1294,8 @@
result = retval->nodesetval;
- array_init(return_value);
-
if (result != NULL) {
+ array_init(return_value);
for (i = 0; i < result->nodeNr; ++i) {
nodeptr = result->nodeTab[i];
if (nodeptr->type == XML_TEXT_NODE || nodeptr->type ==
XML_ELEMENT_NODE || nodeptr->type == XML_ATTRIBUTE_NODE) {
@@ -1317,6 +1316,8 @@
add_next_index_zval(return_value, value);
}
}
+ } else {
+ RETVAL_FALSE;
}
xmlXPathFreeObject(retval);
Modified: php/php-src/trunk/ext/simplexml/simplexml.c
===================================================================
--- php/php-src/trunk/ext/simplexml/simplexml.c 2011-06-07 01:27:29 UTC (rev
311873)
+++ php/php-src/trunk/ext/simplexml/simplexml.c 2011-06-07 01:40:54 UTC (rev
311874)
@@ -1294,9 +1294,8 @@
result = retval->nodesetval;
- array_init(return_value);
-
if (result != NULL) {
+ array_init(return_value);
for (i = 0; i < result->nodeNr; ++i) {
nodeptr = result->nodeTab[i];
if (nodeptr->type == XML_TEXT_NODE || nodeptr->type ==
XML_ELEMENT_NODE || nodeptr->type == XML_ATTRIBUTE_NODE) {
@@ -1317,6 +1316,8 @@
add_next_index_zval(return_value, value);
}
}
+ } else {
+ RETVAL_FALSE;
}
xmlXPathFreeObject(retval);
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php