Skip to content

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