diff --git a/src/CakeAdapter.php b/src/CakeAdapter.php index 7e5eeafc..c5bcad7c 100644 --- a/src/CakeAdapter.php +++ b/src/CakeAdapter.php @@ -58,7 +58,7 @@ public function __construct(AdapterInterface $adapter, ?Connection $connection = if ($connection->getDriver() instanceof Postgres) { $config = $connection->config(); $schema = empty($config['schema']) ? 'public' : $config['schema']; - $pdo->exec('SET search_path TO ' . $schema); + $pdo->exec('SET search_path TO ' . $pdo->quote($schema)); } $connection->getDriver()->setConnection($pdo); }