Fix 1st case of #9893. 2nd case was already fixed in previous commit.

This commit is contained in:
Joey Smith 2001-08-26 11:36:27 +00:00
parent dc9769ea96
commit 5d451c9885

View file

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