r5321 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r5320‎ | r5321 | r5322 >
Date:10:30, 20 September 2004
Author:timstarling
Status:old
Tags:
Comment:
suppress warnings before calling $wgLang->getMessage(), because many language files generate notices
Modified paths:
  • /trunk/phase3/includes/MessageCache.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/MessageCache.php
@@ -233,12 +233,16 @@
234234
235235 # Try the array in $wgLang
236236 if ( !$message ) {
 237+ wfSuppressWarnings();
237238 $message = $wgLang->getMessage( $key );
 239+ wfRestoreWarnings();
238240 }
239241
240242 # Try the English array
241243 if ( !$message && $wgLanguageCode != 'en' ) {
 244+ wfSuppressWarnings();
242245 $message = Language::getMessage( $key );
 246+ wfRestoreWarnings();
243247 }
244248
245249 # Final fallback

Status & tagging log