]> granicus.if.org Git - php/commitdiff
Close Bug #10235.
authorJoey Smith <joey@php.net>
Mon, 16 Jul 2001 11:16:44 +0000 (11:16 +0000)
committerJoey Smith <joey@php.net>
Mon, 16 Jul 2001 11:16:44 +0000 (11:16 +0000)
This makes domxml_root() work again. It now works
equally as well as object method or a simple function.

ext/domxml/php_domxml.c

index cc19e664f51f00fe5ed20ecdfa6bda6a252fb3cb..f6b525d06b165a0a4ad1ec6cd55113cd2130923e 100644 (file)
@@ -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;