diff options
author | Felipe Pena <felipensp@gmail.com> | 2015-10-11 12:08:34 -0300 |
---|---|---|
committer | Nikita Popov <nikic@php.net> | 2015-10-16 17:44:17 +0200 |
commit | 20a384dfa924c6e0d7aa08e1f79d940047ffdb49 (patch) | |
tree | 7f8efaeeb40801331420e557504107b625ff24f6 /ext/xsl/xsltprocessor.c | |
parent | e3e92e96c158c4fc294ead36f9d73941bdbf679e (diff) | |
download | php-git-20a384dfa924c6e0d7aa08e1f79d940047ffdb49.tar.gz |
Fixed bug #70678 (PHP7 returns true when false is expected)
Cherry-pick from master.
Diffstat (limited to 'ext/xsl/xsltprocessor.c')
-rw-r--r-- | ext/xsl/xsltprocessor.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/ext/xsl/xsltprocessor.c b/ext/xsl/xsltprocessor.c index ffd0552263..acba075340 100644 --- a/ext/xsl/xsltprocessor.c +++ b/ext/xsl/xsltprocessor.c @@ -351,7 +351,7 @@ static void xsl_ext_function_php(xmlXPathParserContextPtr ctxt, int nargs, int t nodep = dom_object_get_node(obj); valuePush(ctxt, xmlXPathNewNodeSet(nodep)); } else if (Z_TYPE(retval) == IS_TRUE || Z_TYPE(retval) == IS_FALSE) { - valuePush(ctxt, xmlXPathNewBoolean(Z_LVAL(retval))); + valuePush(ctxt, xmlXPathNewBoolean(Z_TYPE(retval) == IS_TRUE)); } else if (Z_TYPE(retval) == IS_OBJECT) { php_error_docref(NULL, E_WARNING, "A PHP Object cannot be converted to a XPath-string"); valuePush(ctxt, xmlXPathNewString((const xmlChar *) "")); |