On a multi-wiki server using a l10n cache, the cache will probably
include aliases from all extensions enabled for any wiki while the
namespaces themselves will only be defined on the wikis where the
extension is loaded.
Bug: T206030
Change-Id: I985dfa3eb17944d5fc0c5be0979be21504fb1341
}
$this->namespaceAliases = $aliases + $convertedNames;
+
+ # Filter out aliases to namespaces that don't exist, e.g. from extensions
+ # that aren't loaded here but are included in the l10n cache.
+ # (array_intersect preserves keys from its first argument)
+ $this->namespaceAliases = array_intersect(
+ $this->namespaceAliases,
+ array_keys( $this->getNamespaces() )
+ );
}
return $this->namespaceAliases;