summaryrefslogtreecommitdiffstats
path: root/application/service/files.php
diff options
context:
space:
mode:
authorFlorian Pritz <bluewind@xinu.at>2015-04-18 17:12:21 +0200
committerFlorian Pritz <bluewind@xinu.at>2015-04-18 17:12:21 +0200
commit59b426dbfb6dd83c0ddf0814f21a536ae500f3d9 (patch)
tree8e220a8de04d3080e696e6dbc6c7aeb3d9ebaa79 /application/service/files.php
parentf820c95fe3ea72f6092bda51abc078e46497d664 (diff)
s/files:get_multipaste_history: Remove multipastes without items
Signed-off-by: Florian Pritz <bluewind@xinu.at>
Diffstat (limited to 'application/service/files.php')
-rw-r--r--application/service/files.php8
1 files changed, 8 insertions, 0 deletions
diff --git a/application/service/files.php b/application/service/files.php
index 15361227c..33354d456 100644
--- a/application/service/files.php
+++ b/application/service/files.php
@@ -66,6 +66,14 @@ class files {
$multipaste_info[$item["url_id"]]["items"][$item["id"]] = array("id" => $item["id"]);
}
+ // No idea why, but this can/could happen so be more forgiving and clean up
+ foreach ($multipaste_info as $key => $m) {
+ if (!isset($m["items"])) {
+ $CI->mmultipaste->delete_id($key);
+ unset($multipaste_info[$key]);
+ }
+ }
+
return $multipaste_info;
}