From 03efc3905575f789400957b1703be3f3f8650413 Mon Sep 17 00:00:00 2001 From: Bryan Davis Date: Mon, 27 Jan 2014 09:25:29 -0800 Subject: [PATCH] Always return an array from SwiftFileBackend::addMissingMetadata Correct the behavior of SwiftFileBackend::addMissingMetadata to match the documentation and calling code expectations by always returning an array. Bug: 60477 Change-Id: I8d12888a6ebfa23502f8cf3a28866dcb00a18ec8 --- includes/filebackend/SwiftFileBackend.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/includes/filebackend/SwiftFileBackend.php b/includes/filebackend/SwiftFileBackend.php index b459b776aa..f2d75ded8b 100644 --- a/includes/filebackend/SwiftFileBackend.php +++ b/includes/filebackend/SwiftFileBackend.php @@ -708,7 +708,7 @@ class SwiftFileBackend extends FileBackendStore { $auth = $this->getAuthentication(); if ( !$auth ) { $objHdrs['x-object-meta-sha1base36'] = false; - return false; // failed + return $objHdrs; // failed } $status = Status::newGood(); @@ -726,7 +726,7 @@ class SwiftFileBackend extends FileBackendStore { 'headers' => $this->authTokenHeaders( $auth ) + $objHdrs ) ); if ( $rcode >= 200 && $rcode <= 299 ) { - return true; // success + return $objHdrs; // success } } } @@ -734,7 +734,7 @@ class SwiftFileBackend extends FileBackendStore { trigger_error( "Unable to set SHA-1 metadata for $path", E_USER_WARNING ); $objHdrs['x-object-meta-sha1base36'] = false; - return false; // failed + return $objHdrs; // failed } protected function doGetFileContentsMulti( array $params ) { -- 2.20.1