com php-src: Merge branch 'pull-request/2742': NEWS ext/bcmath/bcmath.c ext/bcmath/libbcmath/src/bcmath.h ext/bcmath/tests/bcpow_erro r1.phpt
ext/bcmath/tests/bcpow_error2.phpt

From: Date: Mon, 18 Sep 2017 13:21:22 +0000
Subject: com php-src: Merge branch 'pull-request/2742': NEWS ext/bcmath/bcmath.c ext/bcmath/libbcmath/src/bcmath.h ext/bcmath/tests/bcpow_erro r1.phpt
ext/bcmath/tests/bcpow_error2.phpt
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-99453@lists.php.net to get a copy of this message
Commit: 73af7a847c5f08d32802d41fc45ed4b01ec9fb9c Author: Christoph M. Becker <cmbecker69@gmx.de> Mon, 18 Sep 2017 15:04:44 +0200 Parents: f63bfea105cd2d1285a1189c197d8371cad5f403 870ed5106d6274905b5aa4341429deef12c92e55 Branches: master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=73af7a847c5f08d32802d41fc45ed4b01ec9fb9c Log: Merge branch 'pull-request/2742' * pull-request/2742: Fixed bug #66364 (BCMath bcmul ignores scale parameter) Bugs: https://bugs.php.net/66364 Changed paths: MM NEWS MM ext/bcmath/bcmath.c MM ext/bcmath/libbcmath/src/bcmath.h MA ext/bcmath/tests/bcpow_error1.phpt MA ext/bcmath/tests/bcpow_error2.phpt Diff: diff --cc NEWS index 1ca1c94,a13a638..27413c6 --- a/NEWS +++ b/NEWS @@@ -11,11 -11,6 +11,13 @@@ PH . Fixed bug #74860 (Uncaught exceptions not being formatted properly when error_log set to "syslog"). (Philip Prindeville) +- BCMath: ++ . Fixed bug #66364 (BCMath bcmul ignores scale parameter). (cmb) + . Implemented request #67855 (No way to get current scale in use). (Chris + Wright, cmb) ++ . Fixed bug #75164 (split_bc_num() is pointless). (cmb) + . Fixed bug #75169 (BCMath errors/warnings bypass PHP's error handling). (cmb) + - Date: . Implemented FR #74668: Add DateTime::createFromImmutable() method. (majkl578, Rican7) diff --cc ext/bcmath/tests/bcpow_error1.phpt index 1075986,0000000..d3189f0 mode 100644,000000..100644 --- a/ext/bcmath/tests/bcpow_error1.phpt +++ b/ext/bcmath/tests/bcpow_error1.phpt @@@ -1,15 -1,0 +1,15 @@@ +--TEST-- +bcpow() does not support non-integral exponents +--SKIPIF-- +<?php +if (!extension_loaded('bcmath')) die('skip bcmath extension is not available'); +?> +--FILE-- +<?php +var_dump(bcpow('1', '1.1', 2)); +?> +===DONE=== +--EXPECTF-- +Warning: bcpow(): non-zero scale in exponent in %s on line %d - string(1) "1" ++string(4) "1.00" +===DONE=== diff --cc ext/bcmath/tests/bcpow_error2.phpt index c58a737,0000000...49fd0b8 mode 100644,000000..100644 --- a/ext/bcmath/tests/bcpow_error2..phpt +++ b/ext/bcmath/tests/bcpow_error2.phpt @@@ -1,15 -1,0 +1,15 @@@ +--TEST-- +bcpow() does not support exponents >= 2**63 +--SKIPIF-- +<?php +if (!extension_loaded('bcmath')) die('skip bcmath extension is not available'); +?> +--FILE-- +<?php +var_dump(bcpow('0', '9223372036854775808', 2)); +?> +===DONE=== +--EXPECTF-- +Warning: bcpow(): exponent too large in %s on line %d - string(1) "1" ++string(4) "1.00" +===DONE===

« previous php.cvs (#99453) next »