From: Ævar Arnfjörð Bjarmason Date: Sun, 22 Jan 2006 12:38:13 +0000 (+0000) Subject: * wfGetSiteNotice() gets called on DB errors (wtf?) so depending on $wgUser X-Git-Tag: 1.6.0~445 X-Git-Url: https://git.cyclocoop.org/%7B%24www_url%7Dadmin/compta/exercices/journal.php?a=commitdiff_plain;h=ec2b295ba5204473df589526d488667211c54140;p=lhc%2Fweb%2Fwiklou.git * wfGetSiteNotice() gets called on DB errors (wtf?) so depending on $wgUser which depends on the database for this executing successfully is not a very good idea... --- diff --git a/includes/GlobalFunctions.php b/includes/GlobalFunctions.php index 5b4d8bc869..ceb5fa9326 100644 --- a/includes/GlobalFunctions.php +++ b/includes/GlobalFunctions.php @@ -1396,7 +1396,7 @@ function wfGetSiteNotice() { $fname = 'wfGetSiteNotice'; wfProfileIn( $fname ); - if( $wgUser->isLoggedIn() ) { + if( is_object( $wgUser ) && $wgUser->isLoggedIn() ) { $siteNotice = wfGetCachedNotice( 'sitenotice' ); $siteNotice = !$siteNotice ? $wgSiteNotice : $siteNotice; } else {