diff options
author | Felipe Pena <felipensp@gmail.com> | 2014-05-10 11:53:45 -0300 |
---|---|---|
committer | Felipe Pena <felipensp@gmail.com> | 2014-05-10 11:53:45 -0300 |
commit | 8bea8cf9cd65f6b4d4093ea7c68a19a588c7fbd0 (patch) | |
tree | b3044efbf52377883c78ddbd147eeaca17809519 /ext/simplexml/simplexml.c | |
parent | 2379ec474eb70ea73c86d03ca3722e7b33bee08e (diff) | |
parent | 345f6d90d5947c5cf380db79c1c6366a72cc6e8d (diff) | |
download | php-git-8bea8cf9cd65f6b4d4093ea7c68a19a588c7fbd0.tar.gz |
Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
- Fixed missing NULL check in SimpleXMLElement::xpath()
Diffstat (limited to 'ext/simplexml/simplexml.c')
-rw-r--r-- | ext/simplexml/simplexml.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/ext/simplexml/simplexml.c b/ext/simplexml/simplexml.c index d9a37d35ac..13938f53fb 100644 --- a/ext/simplexml/simplexml.c +++ b/ext/simplexml/simplexml.c @@ -1270,6 +1270,9 @@ SXE_METHOD(xpath) if (!sxe->node) { php_libxml_increment_node_ptr((php_libxml_node_object *)sxe, xmlDocGetRootElement((xmlDocPtr) sxe->document->ptr), NULL TSRMLS_CC); } + if (!sxe->node) { + RETURN_FALSE; + } nodeptr = php_sxe_get_first_node(sxe, sxe->node->node TSRMLS_CC); |