Skip to content

Commit 19629b5

Browse files
authored
Fix up schema to only be configured if set (#912)
1 parent 54d1bea commit 19629b5

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

src/CakeAdapter.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,8 +59,9 @@ public function __construct(AdapterInterface $adapter, ?Connection $connection =
5959

6060
if ($connection->getDriver() instanceof Postgres) {
6161
$config = $connection->config();
62-
$schema = empty($config['schema']) ? 'public' : $config['schema'];
63-
$pdo->exec('SET search_path TO ' . $pdo->quote($schema));
62+
if (!empty($config['schema'])) {
63+
$pdo->exec('SET search_path TO ' . $pdo->quote($config['schema']));
64+
}
6465
}
6566

6667
$driver = $connection->getDriver();

0 commit comments

Comments
 (0)