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

[9.x] Eloquent: firstWhere returns Object instead of NULL #41099

Merged
merged 1 commit into from
Feb 18, 2022

Conversation

marvinrabe
Copy link
Contributor

@marvinrabe marvinrabe commented Feb 18, 2022

Fixes #41098

@marvinrabe marvinrabe changed the title Eloquent: firstWhere returns Object instead of NULL [9.x] Eloquent: firstWhere returns Object instead of NULL Feb 18, 2022
@driesvints
Copy link
Member

This definitely isn't wanted and changes the behavior of this method to accept more parameters than needed.

@driesvints driesvints closed this Feb 18, 2022
@driesvints driesvints reopened this Feb 18, 2022
Copy link
Member

@driesvints driesvints left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can confirm this fixes the issue for me as well. @marvinrabe can you maybe also add a test?

@taylorotwell taylorotwell merged commit a803bfd into laravel:9.x Feb 18, 2022
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.

Eloquent: firstWhere returns wrong result when passing an operator as value
3 participants