summaryrefslogtreecommitdiffstats
path: root/lib/api.php
diff options
context:
space:
mode:
authorTom Needham <needham.thomas@gmail.com>2012-08-03 15:20:01 +0000
committerTom Needham <needham.thomas@gmail.com>2012-08-03 15:20:01 +0000
commit21f8646ffc9057bd15fe8a30b781ee20766b5656 (patch)
tree03e63472be620eb6383aa69b01463b8540592379 /lib/api.php
parent6047a5fe515091d755e964c24de93fc29a5f9754 (diff)
downloadnextcloud-server-21f8646ffc9057bd15fe8a30b781ee20766b5656.tar.gz
nextcloud-server-21f8646ffc9057bd15fe8a30b781ee20766b5656.zip
API: Fix merging of responses. Return 400 error when no OAuth operation sent.
Diffstat (limited to 'lib/api.php')
-rw-r--r--lib/api.php10
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/api.php b/lib/api.php
index 90f36aefbcd..c91216179e2 100644
--- a/lib/api.php
+++ b/lib/api.php
@@ -107,16 +107,16 @@ class OC_API {
$numresponses = count($responses);
foreach($responses as $response){
- if(is_int($response) && empty($finalresponse)){
- $finalresponse = $response;
+ if(is_int($response['response']) && empty($finalresponse)){
+ $finalresponse = $response['response'];
continue;
}
- if(is_array($response)){
+ if(is_array($response['response'])){
// Shipped apps win
if(OC_App::isShipped($response['app'])){
- $finalresponse = array_merge_recursive($finalresponse, $response);
+ $finalresponse = array_merge_recursive($finalresponse, $response['response']);
} else {
- $finalresponse = array_merge_recursive($response, $finalresponse);
+ $finalresponse = array_merge_recursive($response['response'], $finalresponse);
}
}
}