From: jenkins-bot Date: Tue, 20 Sep 2016 19:23:12 +0000 (+0000) Subject: Merge "Set an initial dummy domain in Database::__construct()" X-Git-Tag: 1.31.0-rc.0~5452 X-Git-Url: http://git.cyclocoop.org/%22.%24redirect_annul.%22?a=commitdiff_plain;h=a108728ced762b29daa3228efeb9c53a6d06cfc6;p=lhc%2Fweb%2Fwiklou.git Merge "Set an initial dummy domain in Database::__construct()" --- a108728ced762b29daa3228efeb9c53a6d06cfc6 diff --cc includes/libs/rdbms/database/Database.php index dbf3ad5b41,901afd175d..9b4e4ac0fa --- a/includes/libs/rdbms/database/Database.php +++ b/includes/libs/rdbms/database/Database.php @@@ -266,11 -270,20 +266,14 @@@ abstract class Database implements IDat ? $params['srvCache'] : new HashBagOStuff(); - $this->profiler = isset( $params['profiler'] ) ? $params['profiler'] : null; - $this->trxProfiler = isset( $params['trxProfiler'] ) - ? $params['trxProfiler'] - : new TransactionProfiler(); - $this->connLogger = isset( $params['connLogger'] ) - ? $params['connLogger'] - : new \Psr\Log\NullLogger(); - $this->queryLogger = isset( $params['queryLogger'] ) - ? $params['queryLogger'] - : new \Psr\Log\NullLogger(); + $this->profiler = $params['profiler']; + $this->trxProfiler = $params['trxProfiler']; + $this->connLogger = $params['connLogger']; + $this->queryLogger = $params['queryLogger']; + // Set initial dummy domain until open() sets the final DB/prefix + $this->currentDomain = DatabaseDomain::newUnspecified(); + if ( $user ) { $this->open( $server, $user, $password, $dbName ); } elseif ( $this->requiresDatabaseUser() ) {