Skip to content

fix array_splice with non-array replacement#2457

Merged
ondrejmirtes merged 1 commit intophpstan:1.10.xfrom
schlndh:fix-arraySpliceWithNonArrayReplacement
Jun 28, 2023
Merged

fix array_splice with non-array replacement#2457
ondrejmirtes merged 1 commit intophpstan:1.10.xfrom
schlndh:fix-arraySpliceWithNonArrayReplacement

Conversation

@schlndh
Copy link
Copy Markdown
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
@ondrejmirtes
Copy link
Copy Markdown
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

Development

Successfully merging this pull request may close these issues.

2 participants