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: v6.0.0alpha2~833^2 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=b3e7485612f6ab0679e35a7c9ab54bf9bbdc66d6;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 8d6bbb7cc09..12eea52d3b3 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