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

[5.7] fix bug when using 'some' alias for the 'contains' method #26696

Merged
merged 2 commits into from
Dec 2, 2018

Conversation

chapeupreto
Copy link
Contributor

This PR aims to solve issue #26695

@chapeupreto chapeupreto changed the title fix bug when using 'some' alias for the 'contains' method [5.7] fix bug when using 'some' alias for the 'contains' method Dec 1, 2018
@staudenmeir
Copy link
Contributor

array_filter() breaks values like 0 or null:

$collection = collect([0]);
$collection->contains(0); // exception

I suggest a different solution: We replace return $this->contains($key, $operator, $value); with return $this->contains(...func_get_args());.

@chapeupreto
Copy link
Contributor Author

Thanks for pointing that out.

I followed your suggestion and everything is working pretty good now.

Thanks!

@taylorotwell taylorotwell merged commit 903305b into laravel:5.7 Dec 2, 2018
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

3 participants