Merge pull request #3121 from owncloud/ocs_fix_api_response

Fix the api response when a shipped and third party app both fail.
This commit is contained in:
Lukas Reschke 2013-04-27 10:05:06 -07:00
commit 51a1f41225

View file

@ -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