Skip to content

Commit 25fd696

Browse files
authored
[5.x] Prevent null in strtolower() (#11869)
1 parent 14cd46b commit 25fd696

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Query/EloquentQueryBuilder.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ public function where($column, $operator = null, $value = null, $boolean = 'and'
160160
return $this->whereNested($column, $boolean);
161161
}
162162

163-
if (strtolower($operator) == 'like') {
163+
if ($operator !== null && strtolower($operator) == 'like') {
164164
$grammar = $this->builder->getConnection()->getQueryGrammar();
165165
$this->builder->whereRaw('LOWER('.$grammar->wrap($this->column($column)).') LIKE ?', strtolower($value), $boolean);
166166

0 commit comments

Comments
 (0)