summaryrefslogtreecommitdiff
path: root/ext/domxml/php_domxml.c
diff options
context:
space:
mode:
authorJoey Smith <joey@php.net>2001-08-26 11:36:27 +0000
committerJoey Smith <joey@php.net>2001-08-26 11:36:27 +0000
commit5d451c9885c3983eb83ce662e25a4699035cf20c (patch)
treedd2715ba4d57f11a8a58f05b630ec920af949957 /ext/domxml/php_domxml.c
parentdc9769ea9691fb02b81c88535f53b2679aff4d07 (diff)
downloadphp-git-5d451c9885c3983eb83ce662e25a4699035cf20c.tar.gz
Fix 1st case of #9893. 2nd case was already fixed in previous commit.
Diffstat (limited to 'ext/domxml/php_domxml.c')
-rw-r--r--ext/domxml/php_domxml.c6
1 files changed, 6 insertions, 0 deletions
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)