Replace localisation cache check removed in r91432 with another check
authorRobin Pepermans <robin@users.mediawiki.org>
Fri, 9 Sep 2011 12:49:40 +0000 (12:49 +0000)
committerRobin Pepermans <robin@users.mediawiki.org>
Fri, 9 Sep 2011 12:49:40 +0000 (12:49 +0000)
includes/LocalisationCache.php

index 0a49860..d451dc2 100644 (file)
@@ -645,6 +645,11 @@ class LocalisationCache {
                # Run hooks
                wfRunHooks( 'LocalisationCacheRecache', array( $this, $code, &$allData ) );
 
+               if ( is_null( $allData['namespaceNames'] ) ) {
+                       throw new MWException( __METHOD__.': Localisation data failed sanity check! ' .
+                               'Check that your languages/messages/MessagesEn.php file is intact.' );
+               }
+
                # Set the preload key
                $allData['preload'] = $this->buildPreload( $allData );