summaryrefslogtreecommitdiff
path: root/ext/domxml
diff options
context:
space:
mode:
authorJoey Smith <joey@php.net>2001-07-16 11:16:44 +0000
committerJoey Smith <joey@php.net>2001-07-16 11:16:44 +0000
commitf272469b4c1514f6640c73ea012e484e188523ee (patch)
treed82005d97d161e6656e8eb60246610af9d4e13f2 /ext/domxml
parent721c562e2a64d7e0bb551432b919fe4b46ce6743 (diff)
downloadphp-git-f272469b4c1514f6640c73ea012e484e188523ee.tar.gz
Close Bug #10235.
This makes domxml_root() work again. It now works equally as well as object method or a simple function.
Diffstat (limited to 'ext/domxml')
-rw-r--r--ext/domxml/php_domxml.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/ext/domxml/php_domxml.c b/ext/domxml/php_domxml.c
index cc19e664f5..f6b525d06b 100644
--- a/ext/domxml/php_domxml.c
+++ b/ext/domxml/php_domxml.c
@@ -1821,6 +1821,13 @@ PHP_FUNCTION(domxml_doc_document_element)
int ret;
id = getThis();
+
+ if (!id) {
+ if ((ZEND_NUM_ARGS() != 1) || getParameters(ht, 1, &id) == FAILURE) {
+ RETURN_FALSE;
+ }
+ }
+
docp = php_dom_get_object(id, le_domxmldocp, 0);
node = docp->children;