summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLukas Reschke <lukas@statuscode.ch>2013-04-27 10:05:06 -0700
committerLukas Reschke <lukas@statuscode.ch>2013-04-27 10:05:06 -0700
commit51a1f41225ac3a0565d33a50becb2f53993927f0 (patch)
treee1b13b04ab51933e158116bc87e070118c7994ba
parent0e5eccbdbceab74e75c031b758c829763d84377a (diff)
parentb3e7485612f6ab0679e35a7c9ab54bf9bbdc66d6 (diff)
downloadnextcloud-server-51a1f41225ac3a0565d33a50becb2f53993927f0.tar.gz
nextcloud-server-51a1f41225ac3a0565d33a50becb2f53993927f0.zip
Merge pull request #3121 from owncloud/ocs_fix_api_response
Fix the api response when a shipped and third party app both fail.
-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