From fa794e9f0e411fe61a48c977a0f7c2583abce980 Mon Sep 17 00:00:00 2001 From: Zheng Zhu Date: Tue, 21 Sep 2004 00:48:45 +0000 Subject: [PATCH] corrected testing the existence of an object --- includes/GlobalFunctions.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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" ); -- 2.20.1