Two error suppression opertators less (per bug 24159)
authorAlexandre Emsenhuber <ialex@users.mediawiki.org>
Sat, 3 Jul 2010 20:35:32 +0000 (20:35 +0000)
committerAlexandre Emsenhuber <ialex@users.mediawiki.org>
Sat, 3 Jul 2010 20:35:32 +0000 (20:35 +0000)
includes/HTMLFileCache.php

index fd7d048..1e1ba0d 100644 (file)
@@ -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;
        }
 }