#542426 by neilnz: PostgreSQL should not require password to be set in settings.php for trust mode.
parent
38abc06534
commit
0ae93f0cb4
|
@ -26,6 +26,11 @@ class DatabaseConnection_pgsql extends DatabaseConnection {
|
||||||
$connection_options['port'] = 5432;
|
$connection_options['port'] = 5432;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// PostgreSQL in trust mode doesn't require a password to be supplied.
|
||||||
|
if (empty($connection_options['password'])) {
|
||||||
|
$connection_options['password'] = null;
|
||||||
|
}
|
||||||
|
|
||||||
$dsn = 'pgsql:host=' . $connection_options['host'] . ' dbname=' . $connection_options['database'] . ' port=' . $connection_options['port'];
|
$dsn = 'pgsql:host=' . $connection_options['host'] . ' dbname=' . $connection_options['database'] . ' port=' . $connection_options['port'];
|
||||||
parent::__construct($dsn, $connection_options['username'], $connection_options['password'], array(
|
parent::__construct($dsn, $connection_options['username'], $connection_options['password'], array(
|
||||||
// Convert numeric values to strings when fetching.
|
// Convert numeric values to strings when fetching.
|
||||||
|
|
Loading…
Reference in New Issue