Return result object when only one successful response is returned

This commit is contained in:
tomneedham 2013-11-14 01:10:56 +00:00
parent 790055571d
commit a39f3fdbf9
1 changed files with 2 additions and 2 deletions

View File

@ -167,11 +167,11 @@ class OC_API {
// Which reponse code should we return?
// Maybe any that are not OC_API::RESPOND_SERVER_ERROR
$response = reset($shipped['failed']);
return $response;
return $response['response'];
} elseif(!empty($thirdparty['failed'])) {
// Return the third party failure result
$response = reset($thirdparty['failed']);
return $response;
return $response['response'];
} else {
$responses = $thirdparty['succeeded'];
}