Skip to content

Commit

Permalink
Revert "Revert "Revert "[8.x] Fix formatWheres in DatabaseRule (#36441)…
Browse files Browse the repository at this point in the history
…" (#36452)" (#36453)" (#36465)

This reverts commit 0183148.
  • Loading branch information
taylorotwell committed Mar 4, 2021
1 parent ddb0c5e commit 26fe23f
Showing 1 changed file with 1 addition and 5 deletions.
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(',');
}
}

0 comments on commit 26fe23f

Please sign in to comment.