From 23bdbd0834679cf5de896810c3c84ba044e47618 Mon Sep 17 00:00:00 2001 From: Taylor Otwell Date: Sat, 5 Jan 2013 16:22:32 -0600 Subject: [PATCH] Tweak postgres connector. --- laravel/database/connectors/postgres.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/laravel/database/connectors/postgres.php b/laravel/database/connectors/postgres.php index 8920f487..34120fc4 100644 --- a/laravel/database/connectors/postgres.php +++ b/laravel/database/connectors/postgres.php @@ -24,7 +24,9 @@ class Postgres extends Connector { { extract($config); - $dsn = "pgsql:host={$host};dbname={$database}"; + $host_dsn = isset($host) ? 'host='.$host.';' : ''; + + $dsn = "pgsql:{$host_dsn}dbname={$database}"; // The developer has the freedom of specifying a port for the PostgresSQL // database or the default port (5432) will be used by PDO to create the