From 70f83843e0fad72653ce2cfb7625a08012d7d648 Mon Sep 17 00:00:00 2001 From: Aryeh Gregor Date: Fri, 26 Sep 2008 17:25:17 +0000 Subject: [PATCH] Raise E_USER_WARNING if bad option passed to wfMsgExt() --- includes/GlobalFunctions.php | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/includes/GlobalFunctions.php b/includes/GlobalFunctions.php index 34260c7ff2..301e2a8ade 100644 --- a/includes/GlobalFunctions.php +++ b/includes/GlobalFunctions.php @@ -689,6 +689,15 @@ function wfMsgExt( $key, $options ) { $options = array($options); } + foreach( $options as $option ) { + if( !in_array( $option, array( 'parse', 'parseinline', 'escape', + 'escapenoentities', 'replaceafter', 'parsemag', 'content', + 'language' ) ) ) { + trigger_error( "wfMsgExt called with incorrect parameter $option", + E_USER_WARNING ); + } + } + if( in_array('content', $options) ) { $forContent = true; $langCode = true; -- 2.20.1