summaryrefslogtreecommitdiffstats
path: root/application/controllers/api/v2/file.php
diff options
context:
space:
mode:
Diffstat (limited to 'application/controllers/api/v2/file.php')
-rw-r--r--application/controllers/api/v2/file.php7
1 files changed, 7 insertions, 0 deletions
diff --git a/application/controllers/api/v2/file.php b/application/controllers/api/v2/file.php
index 6f95d5525..5dedcd508 100644
--- a/application/controllers/api/v2/file.php
+++ b/application/controllers/api/v2/file.php
@@ -65,6 +65,13 @@ class file extends \controllers\api\api_controller {
unset($history['multipaste_items'][$key]['items'][$inner_key]['sort_order']);
}
}
+
+ foreach (array("items", "multipaste_items") as $key) {
+ if (empty($history[$key])) {
+ $history[$key] = (object) array();
+ }
+ }
+
return $history;
}