- if ( !WikiMap::isCurrentWikiId( $wiki ) && !in_array( $wiki, $wgLocalDatabases ) ) {
- self::$instances[$wiki]->invalidWiki = true;
+ $wikiId = WikiMap::getWikiIdFromDomain( $domain );
+ if (
+ !WikiMap::isCurrentWikiDomain( $domain ) &&
+ !in_array( $wikiId, $wgLocalDatabases )
+ ) {
+ self::$instances[$domain]->invalidDomain = true;