mirror of
https://github.com/php/php-src.git
synced 2025-08-17 14:38:49 +02:00
Fixed bug #75169 (BCMath errors/warnings bypass error handling)
Instead of writing warning messages to `stderr`, we employ PHP's error handling to raise `E_WARNING` even for the single case where `bc_rt_error()` has been called, since that did not actually error out. We choose to call `php_error_docref()` directly in libbcmath, since there is no upstream, and since other PHP core functionality is already used in our bundled libbcmath. Accordingly, we remove `rt.c` so it will not be accidentally used in the future. Besides adapting a few existing tests, we add new tests so that the warnings are tested at least once. We also get rid of the Windows specific tests, since the warning behavior is now supposed to be platform-agnostic.
This commit is contained in:
parent
d1e82b39e2
commit
fd73a54c30
12 changed files with 43 additions and 123 deletions
|
@ -151,8 +151,6 @@ _PROTOTYPE(void bc_out_num, (bc_num num, int o_base, void (* out_char)(int),
|
|||
|
||||
/* Prototypes needed for external utility routines. */
|
||||
|
||||
_PROTOTYPE(void bc_rt_warn, (char *mesg ,...));
|
||||
_PROTOTYPE(void bc_rt_error, (char *mesg ,...));
|
||||
_PROTOTYPE(void bc_out_of_memory, (void));
|
||||
|
||||
#define bc_new_num(length, scale) _bc_new_num_ex((length), (scale), 0)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue