From a39f3fdbf9fb20d9fa4c9cbba4765f9989f850ec Mon Sep 17 00:00:00 2001 From: tomneedham Date: Thu, 14 Nov 2013 01:10:56 +0000 Subject: [PATCH] Return result object when only one successful response is returned --- lib/private/api.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/private/api.php b/lib/private/api.php index 913b3ff0a1..76e00958a2 100644 --- a/lib/private/api.php +++ b/lib/private/api.php @@ -167,11 +167,11 @@ class OC_API { // Which reponse code should we return? // Maybe any that are not OC_API::RESPOND_SERVER_ERROR $response = reset($shipped['failed']); - return $response; + return $response['response']; } elseif(!empty($thirdparty['failed'])) { // Return the third party failure result $response = reset($thirdparty['failed']); - return $response; + return $response['response']; } else { $responses = $thirdparty['succeeded']; }