From: Tom Needham Date: Thu, 25 Apr 2013 00:08:11 +0000 (+0100) Subject: Correct the api response when both a shipped app and/or a third party app fail X-Git-Tag: v5.0.6~26 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=a5978ad544223da770f1ec534f0c51e1e1ad38e7;p=nextcloud-server.git Correct the api response when both a shipped app and/or a third party app fail --- diff --git a/lib/api.php b/lib/api.php index be30894b753..249d7a90350 100644 --- a/lib/api.php +++ b/lib/api.php @@ -155,11 +155,11 @@ class OC_API { // They may have failed for different reasons (different status codes) // Which reponse code should we return? // Maybe any that are not OC_API::RESPOND_SERVER_ERROR - $response = $shipped['failed'][0]; + $response = reset($shipped['failed']); return $response; } else { // Return the third party failure result - $response = $thirdparty['failed'][0]; + $response = reset($thirdparty['failed']); return $response; } // Merge the successful responses