diff options
| author | Felipe Pena <felipensp@gmail.com> | 2014-05-10 11:39:47 -0300 |
|---|---|---|
| committer | Felipe Pena <felipensp@gmail.com> | 2014-05-10 11:39:47 -0300 |
| commit | edbd6c7cc0921c57cee7368e5fc7c7f30a9c68f5 (patch) | |
| tree | a072bcf5a3740ff9a179048440ae1681aae73345 /ext/simplexml/simplexml.c | |
| parent | 398ff21923f0efd1df72c817e1ec33227c90cc3a (diff) | |
| parent | 2379ec474eb70ea73c86d03ca3722e7b33bee08e (diff) | |
| download | php-git-edbd6c7cc0921c57cee7368e5fc7c7f30a9c68f5.tar.gz | |
Merge branch 'PHP-5.5' into PHP-5.6
* PHP-5.5:
- Fixed missing NULL check
Diffstat (limited to 'ext/simplexml/simplexml.c')
| -rw-r--r-- | ext/simplexml/simplexml.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/ext/simplexml/simplexml.c b/ext/simplexml/simplexml.c index f84e1e014d..d9a37d35ac 100644 --- a/ext/simplexml/simplexml.c +++ b/ext/simplexml/simplexml.c @@ -1533,15 +1533,18 @@ SXE_METHOD(getDocNamespaces) return; } - array_init(return_value); - sxe = php_sxe_fetch_object(getThis() TSRMLS_CC); if(from_root){ node = xmlDocGetRootElement((xmlDocPtr)sxe->document->ptr); }else{ GET_NODE(sxe, node); } - + + if (node == NULL) { + RETURN_FALSE; + } + + array_init(return_value); sxe_add_registered_namespaces(sxe, node, recursive, return_value TSRMLS_CC); } /* }}} */ |
