Skip to content

Promote warnings to errors in array_count_values() #4580

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from

Conversation

Girgias
Copy link
Member

@Girgias Girgias commented Aug 20, 2019

Split from #4566

@nikic
Copy link
Member

nikic commented Aug 21, 2019

Not sure this change is appropriate: Note that this warning is really just a warning, not a proper error condition. The function is still going to count other values, and skip over those with unsupported types. The same is not possible if an exception is thrown.

@SjonHortensius
Copy link
Contributor

I agree, this might not be as straight-forward as it seems. The warning+result allows users to choose between failing and continuing. I only use codebases that convert all warnings to exceptions anyway but this change removes the option that other might choose (using the result even though a warning occured as illustrated by the testcase)

@krakjoe krakjoe closed this Aug 29, 2019
@Girgias Girgias deleted the array-count-values-warning2error branch November 20, 2019 19:25
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.

5 participants