From: Aryeh Gregor Date: Fri, 26 Sep 2008 17:25:17 +0000 (+0000) Subject: Raise E_USER_WARNING if bad option passed to wfMsgExt() X-Git-Tag: 1.31.0-rc.0~45080 X-Git-Url: http://git.cyclocoop.org/%7B%24admin_url%7Dmembres/cotisations/gestion/rappel_supprimer.php?a=commitdiff_plain;h=70f83843e0fad72653ce2cfb7625a08012d7d648;p=lhc%2Fweb%2Fwiklou.git Raise E_USER_WARNING if bad option passed to wfMsgExt() --- 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;