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

fix array_splice with non-array replacement #2457

Merged

Conversation

schlndh
Copy link
Contributor

@schlndh schlndh commented Jun 16, 2023

Fixes https://phpstan.org/r/f1506ef5-1320-4bc4-942c-c98c897bd024

PHP documentation says

Note: If replacement is not an array, it will be typecast to one (i.e. (array) $replacement). This may result in unexpected behavior when using an object or null replacement.

@ondrejmirtes ondrejmirtes force-pushed the fix-arraySpliceWithNonArrayReplacement branch from 6de01a2 to aa2bcea Compare June 28, 2023 20:32
@ondrejmirtes ondrejmirtes merged commit 9a0bc5e into phpstan:1.10.x Jun 28, 2023
33 checks passed
@ondrejmirtes
Copy link
Member

Thank you!

@schlndh schlndh deleted the fix-arraySpliceWithNonArrayReplacement branch June 28, 2023 20:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants