Skip to content

Commit 0183148

Browse files
authored
Revert "Revert "[8.x] Fix formatWheres in DatabaseRule (#36441)" (#36452)" (#36453)
This reverts commit f927dc7.
1 parent f927dc7 commit 0183148

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/Illuminate/Validation/Rules/DatabaseRule.php

+5-1
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,11 @@ public function queryCallbacks()
196196
protected function formatWheres()
197197
{
198198
return collect($this->wheres)->map(function ($where) {
199-
return $where['column'].','.'"'.str_replace('"', '""', $where['value']).'"';
199+
if (is_bool($where['value'])) {
200+
return $where['column'].','.($where['value'] ? 'true' : 'false');
201+
} else {
202+
return $where['column'].','.'"'.str_replace('"', '""', $where['value']).'"';
203+
}
200204
})->implode(',');
201205
}
202206
}

0 commit comments

Comments
 (0)