Skip to content

Commit d53be9e

Browse files
authored
[9.x] Support for enum in Builder::whereRelation (#41091)
Fix issue #40994
1 parent fbd2ca3 commit d53be9e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Illuminate/Database/Query/Builder.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -837,8 +837,8 @@ protected function invalidOperatorAndValue($operator, $value)
837837
*/
838838
protected function invalidOperator($operator)
839839
{
840-
return ! in_array(strtolower($operator), $this->operators, true) &&
841-
! in_array(strtolower($operator), $this->grammar->getOperators(), true);
840+
return ! is_string($operator) || (! in_array(strtolower($operator), $this->operators, true) &&
841+
! in_array(strtolower($operator), $this->grammar->getOperators(), true));
842842
}
843843

844844
/**

0 commit comments

Comments
 (0)