]> granicus.if.org Git - php/commitdiff
Fix 1st case of #9893. 2nd case was already fixed in previous commit.
authorJoey Smith <joey@php.net>
Sun, 26 Aug 2001 11:36:27 +0000 (11:36 +0000)
committerJoey Smith <joey@php.net>
Sun, 26 Aug 2001 11:36:27 +0000 (11:36 +0000)
ext/domxml/php_domxml.c

index a42db38bfff7ba63aea882a057555593035afb74..bf3fa48014eacbe6e79a4ae6df7553e5b89c02f1 100644 (file)
@@ -2559,6 +2559,12 @@ static void php_xpathptr_new_context(INTERNAL_FUNCTION_PARAMETERS, int mode)
        int ret;
 
        id = getThis();
+
+       if (!id) {
+               php_error(E_ERROR, "Invalid object");
+               RETURN_FALSE;
+       }
+
        docp = php_dom_get_object(id, le_domxmldocp, 0 TSRMLS_CC);
 
 #if defined(LIBXML_XPTR_ENABLED)