aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--maintenance/Maintenance.php5
-rw-r--r--maintenance/includes/DeleteLocalPasswords.php1
2 files changed, 3 insertions, 3 deletions
diff --git a/maintenance/Maintenance.php b/maintenance/Maintenance.php
index 71d12ee0bc04..f3c2e12da22e 100644
--- a/maintenance/Maintenance.php
+++ b/maintenance/Maintenance.php
@@ -1348,11 +1348,10 @@ abstract class Maintenance {
* @return IMaintainableDatabase
*/
protected function getDB( $db, $groups = [], $wiki = false ) {
- if ( is_null( $this->mDb ) ) {
+ if ( $this->mDb === null ) {
return wfGetDB( $db, $groups, $wiki );
- } else {
- return $this->mDb;
}
+ return $this->mDb;
}
/**
diff --git a/maintenance/includes/DeleteLocalPasswords.php b/maintenance/includes/DeleteLocalPasswords.php
index 747319d6a206..b964417f3533 100644
--- a/maintenance/includes/DeleteLocalPasswords.php
+++ b/maintenance/includes/DeleteLocalPasswords.php
@@ -105,6 +105,7 @@ ERROR
/**
* Get the master DB handle for the current user batch. This is provided for the benefit
* of authentication extensions which subclass this and work with wiki farms.
+ * @return IMaintainableDatabase
*/
protected function getUserDB() {
return $this->getDB( DB_MASTER );