externalstore: make ExternalStoreDB::getDomainId treat false the same as null
authorAaron Schulz <aschulz@wikimedia.org>
Sun, 21 Apr 2019 19:57:05 +0000 (12:57 -0700)
committerAaron Schulz <aschulz@wikimedia.org>
Tue, 21 May 2019 21:05:23 +0000 (21:05 +0000)
Callers like SqlBlobStore sometimes pass in false for the current wiki

Bug: T200471
Change-Id: I3025c869df07de312471d00a0ab7107c1fa14a90

includes/externalstore/ExternalStoreDB.php

index 75f7ccd..4164505 100644 (file)
@@ -166,7 +166,7 @@ class ExternalStoreDB extends ExternalStoreMedium {
         * @return string|bool Database domain ID or false
         */
        private function getDomainId( array $server ) {
-               if ( isset( $this->params['wiki'] ) ) {
+               if ( isset( $this->params['wiki'] ) && $this->params['wiki'] !== false ) {
                        return $this->params['wiki']; // explicit domain
                }