From: Tim Starling Date: Mon, 20 Sep 2004 10:30:18 +0000 (+0000) Subject: suppress warnings before calling $wgLang->getMessage(), because many language files... X-Git-Tag: 1.5.0alpha1~1939 X-Git-Url: http://git.cyclocoop.org/%24href?a=commitdiff_plain;h=e5e545aac9963cd64d78ca4267757a1c88167d41;p=lhc%2Fweb%2Fwiklou.git suppress warnings before calling $wgLang->getMessage(), because many language files generate notices --- diff --git a/includes/MessageCache.php b/includes/MessageCache.php index c0f8f02da8..62c730e649 100755 --- a/includes/MessageCache.php +++ b/includes/MessageCache.php @@ -233,12 +233,16 @@ class MessageCache # Try the array in $wgLang if ( !$message ) { + wfSuppressWarnings(); $message = $wgLang->getMessage( $key ); + wfRestoreWarnings(); } # Try the English array if ( !$message && $wgLanguageCode != 'en' ) { + wfSuppressWarnings(); $message = Language::getMessage( $key ); + wfRestoreWarnings(); } # Final fallback