summaryrefslogtreecommitdiff
path: root/ext/simplexml/simplexml.c
diff options
context:
space:
mode:
Diffstat (limited to 'ext/simplexml/simplexml.c')
-rw-r--r--ext/simplexml/simplexml.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/ext/simplexml/simplexml.c b/ext/simplexml/simplexml.c
index 75eb742c0..888a6c0fd 100644
--- a/ext/simplexml/simplexml.c
+++ b/ext/simplexml/simplexml.c
@@ -18,7 +18,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: simplexml.c 308262 2011-02-11 21:10:48Z felipe $ */
+/* $Id: simplexml.c 314376 2011-08-06 14:47:44Z felipe $ */
#ifdef HAVE_CONFIG_H
#include "config.h"
@@ -1264,9 +1264,8 @@ SXE_METHOD(xpath)
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 @@ SXE_METHOD(xpath)
add_next_index_zval(return_value, value);
}
}
+ } else {
+ RETVAL_FALSE;
}
xmlXPathFreeObject(retval);
@@ -2515,14 +2516,14 @@ const zend_function_entry simplexml_functions[] = { /* {{{ */
PHP_FE(simplexml_load_file, arginfo_simplexml_load_file)
PHP_FE(simplexml_load_string, arginfo_simplexml_load_string)
PHP_FE(simplexml_import_dom, arginfo_simplexml_import_dom)
- {NULL, NULL, NULL}
+ PHP_FE_END
};
/* }}} */
static const zend_module_dep simplexml_deps[] = { /* {{{ */
ZEND_MOD_REQUIRED("libxml")
ZEND_MOD_REQUIRED("spl")
- {NULL, NULL, NULL}
+ ZEND_MOD_END
};
/* }}} */
@@ -2562,7 +2563,7 @@ static const zend_function_entry sxe_functions[] = { /* {{{ */
SXE_ME(addAttribute, arginfo_simplexmlelement_addchild, ZEND_ACC_PUBLIC)
SXE_ME(__toString, arginfo_simplexmlelement__void, ZEND_ACC_PUBLIC)
SXE_ME(count, arginfo_simplexmlelement__void, ZEND_ACC_PUBLIC)
- {NULL, NULL, NULL}
+ PHP_FE_END
};
/* }}} */
@@ -2608,7 +2609,7 @@ PHP_MINFO_FUNCTION(simplexml)
{
php_info_print_table_start();
php_info_print_table_header(2, "Simplexml support", "enabled");
- php_info_print_table_row(2, "Revision", "$Revision: 308262 $");
+ php_info_print_table_row(2, "Revision", "$Revision: 314376 $");
php_info_print_table_row(2, "Schema support",
#ifdef LIBXML_SCHEMAS_ENABLED
"enabled");