diff options
Diffstat (limited to 'ext/dom/xpath.c')
-rw-r--r-- | ext/dom/xpath.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/ext/dom/xpath.c b/ext/dom/xpath.c index 32adfe3b6f..8a7bf60f38 100644 --- a/ext/dom/xpath.c +++ b/ext/dom/xpath.c @@ -215,8 +215,8 @@ static void dom_xpath_ext_function_php(xmlXPathParserContextPtr ctxt, int nargs, obj = Z_XPATHOBJ_P(&retval); nodep = dom_object_get_node(obj); valuePush(ctxt, xmlXPathNewNodeSet(nodep)); - } else if (Z_TYPE(retval) == IS_BOOL) { - valuePush(ctxt, xmlXPathNewBoolean(Z_BVAL(retval))); + } else if (Z_TYPE(retval) == IS_FALSE || Z_TYPE(retval) == IS_TRUE) { + valuePush(ctxt, xmlXPathNewBoolean(Z_TYPE(retval) == IS_TRUE)); } else if (Z_TYPE(retval) == IS_OBJECT) { php_error_docref(NULL TSRMLS_CC, E_WARNING, "A PHP Object cannot be converted to a XPath-string"); valuePush(ctxt, xmlXPathNewString((xmlChar *)"")); |