Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Revert "Revert "Revert "[8.x] Fix formatWheres in DatabaseRule (#36441)…
…" (#36452)" (#36453)"

This reverts commit 0183148.
  • Loading branch information
taylorotwell authored Mar 4, 2021
commit 230d03b0fe40f470802cc48d921dae70698cde18
6 changes: 1 addition & 5 deletions src/Illuminate/Validation/Rules/DatabaseRule.php
Original file line number Diff line number Diff line change
Expand Up @@ -196,11 +196,7 @@ public function queryCallbacks()
protected function formatWheres()
{
return collect($this->wheres)->map(function ($where) {
if (is_bool($where['value'])) {
return $where['column'].','.($where['value'] ? 'true' : 'false');
} else {
return $where['column'].','.'"'.str_replace('"', '""', $where['value']).'"';
}
return $where['column'].','.'"'.str_replace('"', '""', $where['value']).'"';
})->implode(',');
}
}