Skip to content

Commit

Permalink
[9.x] Support for enum in Builder::whereRelation (#41091)
Browse files Browse the repository at this point in the history
Fix issue #40994
  • Loading branch information
develgold authored Feb 18, 2022
1 parent fbd2ca3 commit d53be9e
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 @@ -837,8 +837,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 d53be9e

Please sign in to comment.