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 preg_match_all stub #4325

Merged
merged 4 commits into from Oct 14, 2020
Merged

Fix preg_match_all stub #4325

merged 4 commits into from Oct 14, 2020

Conversation

Synchro
Copy link
Contributor

@Synchro Synchro commented Oct 14, 2020

preg_match_all can return false given a bad pattern.

This PR fixes the stub, and adds a test for it. The test triggers a warning, so I suppress that since we're only interested in the false return value.

@muglug
Copy link
Collaborator

muglug commented Oct 14, 2020

Add @psalm-ignore-falsable-return to the signature as well

@muglug muglug merged commit e172e88 into vimeo:master Oct 14, 2020
@muglug
Copy link
Collaborator

muglug commented Oct 14, 2020

Thanks!

muglug pushed a commit that referenced this pull request Oct 15, 2020
* preg_match_all can return false

* Test for preg_match_all returning false

* Fix test

* Add @psalm-ignore-falsable-return
danog pushed a commit to danog/psalm that referenced this pull request Jan 29, 2021
* preg_match_all can return false

* Test for preg_match_all returning false

* Fix test

* Add @psalm-ignore-falsable-return
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.

None yet

2 participants