Bug #75169 [Opn->Csd]: BCMath errors/warnings bypass PHP's error handling
| From: | cmb@php.net | Date: | Wed, 13 Sep 2017 14:21:50 +0000 |
| Subject: | Bug #75169 [Opn->Csd]: BCMath errors/warnings bypass PHP's error handling | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-211132@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=75169&edit=1
ID: 75169
Updated by: cmb@php.net
Reported by: cmb@php.net
Summary: BCMath errors/warnings bypass PHP's error handling
-Status: Open
+Status: Closed
Type: Bug
Package: BC math related
Operating System: *
PHP Version: 7.0.23
Block user comment: N
Private report: N
New Comment:
Automatic comment on behalf of cmbecker69@gmx.de
Revision: http://git.php.net/?p=php-src.git;a=commit;h=fd73a54c30a0851ae40a1a361ee4022236be6bcb
Log: Fixed bug #75169 (BCMath errors/warnings bypass error handling)
Previous Comments:
------------------------------------------------------------------------
[2017-09-07 15:23:31] cmb@php.net
Description:
------------
BCMath reports some errors and warnings (such as "exponent too
large in raise") by directly writing to stderr[1], thereby
completely bypassing PHP's error handling.
[1] <https://github.com/php/php-src/blob/php-7.0.23/ext/bcmath/libbcmath/src/rt.c>
Test script:
---------------
<?php
set_error_handler(function ($errno, $errstr) {
var_dump('caught');
});
bcdiv('1', '0');
bcpow('1', '12345678901234567890');
Expected result:
----------------
string(6) "caught"
string(6) "caught"
Actual result:
--------------
string(6) "caught"
bc math error: exponent too large in raise
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=75169&edit=1