Correct the api response when both a shipped app and/or a third party app fail

This commit is contained in:
Tom Needham 2013-04-25 01:08:11 +01:00
parent a0df5903b0
commit b3e7485612

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