summaryrefslogtreecommitdiffstats
path: root/lib/api.php
diff options
context:
space:
mode:
authorTom Needham <tom@owncloud.com>2013-04-25 01:08:11 +0100
committerTom Needham <tom@owncloud.com>2013-04-25 01:08:11 +0100
commitb3e7485612f6ab0679e35a7c9ab54bf9bbdc66d6 (patch)
treee8da82d3bf64d4edad66d45c886b0d478c76fcaa /lib/api.php
parenta0df5903b0fd2d22fb523c292d4012c74b2bbd7e (diff)
downloadnextcloud-server-b3e7485612f6ab0679e35a7c9ab54bf9bbdc66d6.tar.gz
nextcloud-server-b3e7485612f6ab0679e35a7c9ab54bf9bbdc66d6.zip
Correct the api response when both a shipped app and/or a third party app fail
Diffstat (limited to 'lib/api.php')
-rw-r--r--lib/api.php4
1 files changed, 2 insertions, 2 deletions
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