Bug 40167 - Filename cannot be empty in SwiftFileBackend
authorReedy <reedy@wikimedia.org>
Tue, 12 Feb 2013 15:42:36 +0000 (15:42 +0000)
committerReedy <reedy@wikimedia.org>
Tue, 12 Feb 2013 15:42:36 +0000 (15:42 +0000)
As we're evaluating the output, we can just suppress these
warnings

Change-Id: I5b0af085d163824a7406b675eb0decc617ef4b4c

includes/filebackend/SwiftFileBackend.php

index d825d04..9c271ea 100644 (file)
@@ -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;