Skip to content

Conversation

cmb69
Copy link
Member

@cmb69 cmb69 commented Sep 9, 2017

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.

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.
@krakjoe krakjoe added the Bug label Sep 11, 2017
@cmb69
Copy link
Member Author

cmb69 commented Sep 13, 2017

Apparently, this is uncontroversial, so I'm going to merge into master.

@php-pulls php-pulls merged commit fd73a54 into php:master Sep 13, 2017
@cmb69 cmb69 deleted the bcmath-warnings branch September 13, 2017 17:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants