mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/OATHAuth
synced 2024-11-24 08:14:15 +00:00
Convert null global to false
Bug: T270147 Change-Id: I7b6d3bae126d7a1dc57eaf9ab0aef070595910e0
This commit is contained in:
parent
53bb01d46a
commit
60714e7a81
|
@ -86,9 +86,11 @@ class UpdateTables {
|
|||
*/
|
||||
private static function getDatabase() {
|
||||
global $wgOATHAuthDatabase;
|
||||
// Global can be `null` during installation, ensure we pass `false` instead (T270147)
|
||||
$database = $wgOATHAuthDatabase ?? false;
|
||||
$lb = MediaWikiServices::getInstance()->getDBLoadBalancerFactory()
|
||||
->getMainLB( $wgOATHAuthDatabase );
|
||||
return $lb->getConnectionRef( DB_MASTER, [], $wgOATHAuthDatabase );
|
||||
->getMainLB( $database );
|
||||
return $lb->getConnectionRef( DB_MASTER, [], $database );
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in a new issue