Tiny changes, fix comment, remove unused globals and throw and exception instead...
[lhc/web/wiklou.git] / includes / MessageCache.php
index 6b8860c..df572c8 100644 (file)
@@ -546,6 +546,8 @@ class MessageCache {
                }
 
                $lang = wfGetLangObj( $langcode );
+               if (!$lang) throw new MWException( "Bad lang code $langcode given" );
+
                $langcode = $lang->getCode();
 
                $message = false;