diff options
author | Florian Pritz <bluewind@xinu.at> | 2015-04-18 17:12:21 +0200 |
---|---|---|
committer | Florian Pritz <bluewind@xinu.at> | 2015-04-18 17:12:21 +0200 |
commit | 59b426dbfb6dd83c0ddf0814f21a536ae500f3d9 (patch) | |
tree | 8e220a8de04d3080e696e6dbc6c7aeb3d9ebaa79 | |
parent | f820c95fe3ea72f6092bda51abc078e46497d664 (diff) |
s/files:get_multipaste_history: Remove multipastes without items
Signed-off-by: Florian Pritz <bluewind@xinu.at>
-rw-r--r-- | application/service/files.php | 8 |
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; } |