Commit 0ae93f0c authored by webchick's avatar webchick
Browse files

#542426 by neilnz: PostgreSQL should not require password to be set in settings.php for trust mode.

parent 38abc065
......@@ -26,6 +26,11 @@ public function __construct(array $connection_options = array()) {
$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'];
parent::__construct($dsn, $connection_options['username'], $connection_options['password'], array(
// Convert numeric values to strings when fetching.
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment