r5340 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r5339‎ | r5340 | r5341 >
Date:00:48, 21 September 2004
Author:zhengzhu
Status:old
Tags:
Comment:
corrected testing the existence of an object
Modified paths:
  • /trunk/phase3/includes/GlobalFunctions.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/GlobalFunctions.php
@@ -418,9 +418,9 @@
419419
420420 $fname = 'wfMsg';
421421 wfProfileIn( $fname );
422 - if ( $wgMessageCache ) {
 422+ if ( is_object($wgMessageCache) ) {
423423 $message = $wgMessageCache->get( $key, $useDB );
424 - } elseif ( $wgLang ) {
 424+ } elseif ( is_object($wgLang) ) {
425425 $message = $wgLang->getMessage( $key );
426426 } else {
427427 wfDebug( "No language object when getting $key\n" );

Status & tagging log