Apply a live hack from Wikimedia codebase: throw exception on invalid input to MessageCache::addMessages()
This commit is contained in:
parent
61cd5b2313
commit
8b84dcd187
1 changed files with 3 additions and 0 deletions
|
|
@ -619,6 +619,9 @@ class MessageCache {
|
|||
*/
|
||||
function addMessages( $messages, $lang = 'en' ) {
|
||||
wfProfileIn( __METHOD__ );
|
||||
if ( !is_array( $messages ) ) {
|
||||
throw new MWException( __METHOD__.': Invalid message array' );
|
||||
}
|
||||
if ( isset( $this->mExtensionMessages[$lang] ) ) {
|
||||
$this->mExtensionMessages[$lang] = $messages + $this->mExtensionMessages[$lang];
|
||||
} else {
|
||||
|
|
|
|||
Loading…
Reference in a new issue