diff options
Diffstat (limited to 'ext/dom/xpath.c')
| -rw-r--r-- | ext/dom/xpath.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/ext/dom/xpath.c b/ext/dom/xpath.c index 0709be3823..90fcda2e64 100644 --- a/ext/dom/xpath.c +++ b/ext/dom/xpath.c @@ -169,7 +169,7 @@ PHP_FUNCTION(dom_xpath_query) nodep = xmlDocGetRootElement(docp); } - if (docp != nodep->doc) { + if (nodep && docp != nodep->doc) { php_error(E_WARNING, "Node From Wrong Document"); RETURN_FALSE; } |
