* Add exception if magicWords array is empty.
authorRobert Leverington <roberthl@users.mediawiki.org>
Mon, 5 May 2008 14:33:00 +0000 (14:33 +0000)
committerRobert Leverington <roberthl@users.mediawiki.org>
Mon, 5 May 2008 14:33:00 +0000 (14:33 +0000)
languages/Language.php

index dad82aa..8738141 100644 (file)
@@ -1563,6 +1563,7 @@ class Language {
                        } else {
                                # Fall back to English if local list is incomplete
                                $magicWords =& Language::getMagicWords();
+                               if ( !isset($magicWords[$mw->mId]) ) { throw new MWException("Magic word not found" ); }
                                $rawEntry = $magicWords[$mw->mId];
                        }
                }