Skip to content

Conversation

alexandre-daubois
Copy link
Member

This helps with early error detection and explicit intent, instead of having a potential NaN propagating.

Copy link
Member

@bukka bukka left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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");
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would split it to two independent messages if we decide to do it.

@alexandre-daubois
Copy link
Member Author

I understand, I would also be fine throwing a deprecation for now

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants