From: Zheng Zhu Date: Tue, 21 Sep 2004 00:48:45 +0000 (+0000) Subject: corrected testing the existence of an object X-Git-Tag: 1.5.0alpha1~1924 X-Git-Url: https://git.cyclocoop.org/%27.WWW_URL.%27admin/?a=commitdiff_plain;h=fa794e9f0e411fe61a48c977a0f7c2583abce980;p=lhc%2Fweb%2Fwiklou.git corrected testing the existence of an object --- diff --git a/includes/GlobalFunctions.php b/includes/GlobalFunctions.php index 0688d4a086..85a5d15f71 100644 --- a/includes/GlobalFunctions.php +++ b/includes/GlobalFunctions.php @@ -418,9 +418,9 @@ function wfMsgReal( $key, $args, $useDB, $convert=true ) { $fname = 'wfMsg'; wfProfileIn( $fname ); - if ( $wgMessageCache ) { + if ( is_object($wgMessageCache) ) { $message = $wgMessageCache->get( $key, $useDB ); - } elseif ( $wgLang ) { + } elseif ( is_object($wgLang) ) { $message = $wgLang->getMessage( $key ); } else { wfDebug( "No language object when getting $key\n" );