From: Joey Smith Date: Sun, 26 Aug 2001 11:36:27 +0000 (+0000) Subject: Fix 1st case of #9893. 2nd case was already fixed in previous commit. X-Git-Tag: PRE_SUBST_Z_MACROS~356 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=5d451c9885c3983eb83ce662e25a4699035cf20c;p=php Fix 1st case of #9893. 2nd case was already fixed in previous commit. --- diff --git a/ext/domxml/php_domxml.c b/ext/domxml/php_domxml.c index a42db38bff..bf3fa48014 100644 --- a/ext/domxml/php_domxml.c +++ b/ext/domxml/php_domxml.c @@ -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)