Throw ValueError when 1 is provided to the second argument of log()#19370
Open
alexandre-daubois wants to merge 1 commit intophp:masterfrom
Open
Throw ValueError when 1 is provided to the second argument of log()#19370alexandre-daubois wants to merge 1 commit intophp:masterfrom
log()#19370alexandre-daubois wants to merge 1 commit intophp:masterfrom
Conversation
Girgias
reviewed
Aug 5, 2025
36f4140 to
755ddc6
Compare
755ddc6 to
8c5c508
Compare
8c5c508 to
964eff5
Compare
bukka
reviewed
Oct 1, 2025
Member
bukka
left a comment
There was a problem hiding this comment.
Seems like a BC break to me so this might need at least some discussion. Not sure if NaN is worse than exception.
Comment on lines
+670
to
+671
| if (base <= 0.0 || base == 1.0) { | ||
| zend_argument_value_error(2, "must not be 1 or less than or equal to 0"); |
Member
There was a problem hiding this comment.
I would split it to two independent messages if we decide to do it.
Member
Author
|
I understand, I would also be fine throwing a deprecation for now |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This helps with early error detection and explicit intent, instead of having a potential NaN propagating.
Part of https://wiki.php.net/rfc/deprecations_php_8_6