Skip to content

Commit

Permalink
Eloquent: firstWhere returns Object instead of NULL (#41099)
Browse files Browse the repository at this point in the history
  • Loading branch information
marvinrabe authored Feb 18, 2022
1 parent 5042db0 commit a803bfd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Illuminate/Database/Eloquent/Builder.php
Original file line number Diff line number Diff line change
Expand Up @@ -296,7 +296,7 @@ public function where($column, $operator = null, $value = null, $boolean = 'and'
*/
public function firstWhere($column, $operator = null, $value = null, $boolean = 'and')
{
return $this->where($column, $operator, $value, $boolean)->first();
return $this->where(...func_get_args())->first();
}

/**
Expand Down

0 comments on commit a803bfd

Please sign in to comment.