Skip to content

Commit

Permalink
fix forced use of write DB connection
Browse files Browse the repository at this point in the history
  • Loading branch information
oleksiikhr committed Aug 9, 2023
1 parent 58a8f80 commit 2ecb087
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/Illuminate/Database/Connection.php
Expand Up @@ -1080,7 +1080,11 @@ public function escape($value, $binary = false)
*/
protected function escapeString($value)
{
return $this->getPdo()->quote($value);
$pdo = $this->getRawReadPdo() instanceof \PDO
? $this->getReadPdo()
: $this->getPdo();

return $pdo->quote($value);
}

/**
Expand Down

0 comments on commit 2ecb087

Please sign in to comment.