From: Reedy Date: Mon, 17 Dec 2012 20:27:05 +0000 (+0000) Subject: Suppress warnings around unlink call X-Git-Tag: 1.31.0-rc.0~21271 X-Git-Url: http://git.cyclocoop.org/fichier?a=commitdiff_plain;h=faf7d6b7d9629c583c46d9560b074519b93ab76d;p=lhc%2Fweb%2Fwiklou.git Suppress warnings around unlink call Attempt to shut a lot of noise in production logs e.g. 1 Warning: unlink(/mnt/thumbs2/wikipedia/commons/thumb/f/f2/Members_only_jacket.jpg/800px-Members_only_jacket.jpg) [function.unlink]: No such file or directory in /usr/lo cal/apache/common-local/php-1.21wmf6/includes/filebackend/FSFileBackend.php on line 422 Change-Id: I9e1407c4b11301f468f8e291105955ade9a731d0 --- diff --git a/includes/filebackend/FSFileBackend.php b/includes/filebackend/FSFileBackend.php index 3c23e4c999..c60abb1d25 100644 --- a/includes/filebackend/FSFileBackend.php +++ b/includes/filebackend/FSFileBackend.php @@ -419,7 +419,9 @@ class FSFileBackend extends FileBackendStore { ) ); $status->value = new FSFileOpHandle( $this, $params, 'Copy', $cmd ); } else { // immediate write + wfSuppressWarnings(); $ok = unlink( $source ); + wfRestoreWarnings(); if ( !$ok ) { $status->fatal( 'backend-fail-delete', $params['src'] ); return $status;