X-Git-Url: http://git.cyclocoop.org/?a=blobdiff_plain;f=includes%2Ftitle%2FNamespaceInfo.php;h=7234be22c43f1c13d8d484cb3479e762dab2bed4;hb=825d66bfa44c5dae2b78e2fe4f3b16f16aff4a12;hp=105eeaa05d95e7eb0b819ef026c38d3b71085f7e;hpb=4334e1cc02b9749e92c514bd2aa46b347010f913;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/title/NamespaceInfo.php b/includes/title/NamespaceInfo.php index 105eeaa05d..7234be22c4 100644 --- a/includes/title/NamespaceInfo.php +++ b/includes/title/NamespaceInfo.php @@ -62,6 +62,7 @@ class NamespaceInfo { public static $canonicalNames = [ NS_MEDIA => 'Media', NS_SPECIAL => 'Special', + NS_MAIN => '', NS_TALK => 'Talk', NS_USER => 'User', NS_USER_TALK => 'User_talk', @@ -341,7 +342,7 @@ class NamespaceInfo { * Returns array of all defined namespaces with their canonical * (English) names. * - * @return array + * @return string[] */ public function getCanonicalNamespaces() { if ( $this->canonicalNamespaces === null ) { @@ -396,6 +397,7 @@ class NamespaceInfo { */ public function getValidNamespaces() { if ( is_null( $this->validNamespaces ) ) { + $this->validNamespaces = []; foreach ( array_keys( $this->getCanonicalNamespaces() ) as $ns ) { if ( $ns >= 0 ) { $this->validNamespaces[] = $ns;