From: Reedy Date: Tue, 12 Feb 2013 15:42:36 +0000 (+0000) Subject: Bug 40167 - Filename cannot be empty in SwiftFileBackend X-Git-Tag: 1.31.0-rc.0~20714^2 X-Git-Url: https://git.cyclocoop.org/%7B%7B%20url_for%28%27user%27%2C%20userid=session.user.id%29%20%7D%7D?a=commitdiff_plain;h=a4be20a3868ca1e725be88e05c9c4066d8de1869;p=lhc%2Fweb%2Fwiklou.git Bug 40167 - Filename cannot be empty in SwiftFileBackend As we're evaluating the output, we can just suppress these warnings Change-Id: I5b0af085d163824a7406b675eb0decc617ef4b4c --- diff --git a/includes/filebackend/SwiftFileBackend.php b/includes/filebackend/SwiftFileBackend.php index d825d049f2..9c271ea2d2 100644 --- a/includes/filebackend/SwiftFileBackend.php +++ b/includes/filebackend/SwiftFileBackend.php @@ -315,7 +315,9 @@ class SwiftFileBackend extends FileBackendStore { } // (b) Get a SHA-1 hash of the object + wfSuppressWarnings(); $sha1Hash = sha1_file( $params['src'] ); + wfRestoreWarnings(); if ( $sha1Hash === false ) { // source doesn't exist? $status->fatal( 'backend-fail-copy', $params['src'], $params['dst'] ); return $status;