Skip to content
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

Using named arguments with in_array causes a function.strict error #231

Closed
AymDev opened this issue Oct 18, 2023 · 2 comments
Closed

Using named arguments with in_array causes a function.strict error #231

AymDev opened this issue Oct 18, 2023 · 2 comments

Comments

@AymDev
Copy link

AymDev commented Oct 18, 2023

I have an enum where I make a in_array() call using named arguments to set the $haystack as the last (3rd) argument, but I get the following error:

Call to function in_array() requires parameter #3 to be true.

The issue is that the $strict parameter is already set to true. Would this behaviour be considered a bug or should I stop using named arguments there ?

Here is a link to reproduce:
https://phpstan.org/r/48cd75b6-c3a8-4108-904b-f2307e7e48ab

@ondrejmirtes
Copy link
Member

Fixed: 5ae7a3d

Copy link

github-actions bot commented Dec 1, 2023

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Dec 1, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants