From: Alexandre Emsenhuber Date: Sat, 3 Jul 2010 20:35:32 +0000 (+0000) Subject: Two error suppression opertators less (per bug 24159) X-Git-Tag: 1.31.0-rc.0~36282 X-Git-Url: http://git.cyclocoop.org/%40spipnet%40?a=commitdiff_plain;h=ebc9dfc668ee4299abdb0d925a700bba2c2d01c6;p=lhc%2Fweb%2Fwiklou.git Two error suppression opertators less (per bug 24159) --- diff --git a/includes/HTMLFileCache.php b/includes/HTMLFileCache.php index fd7d048bf4..1e1ba0d72d 100644 --- a/includes/HTMLFileCache.php +++ b/includes/HTMLFileCache.php @@ -209,11 +209,21 @@ class HTMLFileCache { public static function clearFileCache( $title ) { global $wgUseFileCache; - if( !$wgUseFileCache ) return false; + + if ( !$wgUseFileCache ) { + return false; + } + + wfSuppressWarnings(); + $fc = new self( $title, 'view' ); - @unlink( $fc->fileCacheName() ); + unlink( $fc->fileCacheName() ); + $fc = new self( $title, 'raw' ); - @unlink( $fc->fileCacheName() ); + unlink( $fc->fileCacheName() ); + + wfRestoreWarnings(); + return true; } }