From 02c39cd896b41228b2f30067c3cfbef9c80883d3 Mon Sep 17 00:00:00 2001 From: Greg Sabino Mullane Date: Mon, 21 Mar 2011 21:20:11 +0000 Subject: [PATCH] Do not depend on the lack of a server for connecting: Postgres has a valid and common use case where the server name (aka host) is empty, as the connection is via a Unix socket. Instead, check if a $user has been sent to the function, as all databases can agree that we need at least that much before doing an open. Fixes bug 28167. --- includes/db/Database.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/includes/db/Database.php b/includes/db/Database.php index 2a8c1982be..f6ab1f63ae 100644 --- a/includes/db/Database.php +++ b/includes/db/Database.php @@ -518,7 +518,7 @@ abstract class DatabaseBase implements DatabaseType { $this->mTablePrefix = $tablePrefix; } - if ( $server ) { + if ( $user ) { $this->open( $server, $user, $password, $dbName ); } } -- 2.20.1