com php-src: Fixed bug #70678 (PHP7 returns true when false is expected): NEWS ext/xsl/xsltprocessor.c

From: Date: Fri, 16 Oct 2015 15:44:17 +0000
Subject: com php-src: Fixed bug #70678 (PHP7 returns true when false is expected): NEWS ext/xsl/xsltprocessor.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-89414@lists.php.net to get a copy of this message
Commit: 20a384dfa924c6e0d7aa08e1f79d940047ffdb49 Author: Felipe Pena <felipensp@gmail.com> Sun, 11 Oct 2015 12:08:34 -0300 Committer: Nikita Popov <nikic@php.net> Fri, 16 Oct 2015 17:44:17 +0200 Parents: e3e92e96c158c4fc294ead36f9d73941bdbf679e Branches: PHP-7.0 master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=20a384dfa924c6e0d7aa08e1f79d940047ffdb49 Log: Fixed bug #70678 (PHP7 returns true when false is expected) Cherry-pick from master. Bugs: https://bugs.php.net/70678 Changed paths: M NEWS M ext/xsl/xsltprocessor.c Diff: diff --git a/NEWS b/NEWS index e7ff52a...4d24e6a 100644 --- a/NEWS +++ b/NEWS @@ -10,6 +10,9 @@ PHP NEWS . Fixed bug #70715 (Segmentation fault inside soap client). (Laruence) . Fixed bug #70709 (SOAP Client generates Segfault). (Laruence) +- XSL: + . Fixed bug #70678 (PHP7 returns true when false is expected). (Felipe) + 15 Oct 2015, PHP 7.0.0 RC 5 - Core: diff --git a/ext/xsl/xsltprocessor.c b/ext/xsl/xsltprocessor.c index ffd0552..acba075 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 *) ""));

« previous php.cvs (#89414) next »