Skip to content

Commit

Permalink
Avoid Passing null to parameter exception on PHP 8.1 (#43951)
Browse files Browse the repository at this point in the history
  • Loading branch information
jose123v authored Aug 31, 2022
1 parent f4846cc commit 762b917
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Illuminate/Database/Query/Builder.php
Original file line number Diff line number Diff line change
Expand Up @@ -846,8 +846,8 @@ protected function invalidOperatorAndValue($operator, $value)
*/
protected function invalidOperator($operator)
{
return ! in_array(strtolower($operator), $this->operators, true) &&
! in_array(strtolower($operator), $this->grammar->getOperators(), true);
return ! is_string($operator) || (! in_array(strtolower($operator), $this->operators, true) &&
! in_array(strtolower($operator), $this->grammar->getOperators(), true));
}

/**
Expand Down

0 comments on commit 762b917

Please sign in to comment.