From: Robert Leverington Date: Mon, 5 May 2008 14:33:00 +0000 (+0000) Subject: * Add exception if magicWords array is empty. X-Git-Tag: 1.31.0-rc.0~47902 X-Git-Url: https://git.cyclocoop.org/%7B%24www_url%7Dadmin/compta/banques/%7B%7B%20url_for%28%27admin_users%27%29%20%7D%7D?a=commitdiff_plain;h=ea37286fc1eebe4feee1f409f8b185b283aa279f;p=lhc%2Fweb%2Fwiklou.git * Add exception if magicWords array is empty. --- diff --git a/languages/Language.php b/languages/Language.php index dad82aa5f2..8738141c83 100644 --- a/languages/Language.php +++ b/languages/Language.php @@ -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]; } }