summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFlorian Pritz <bluewind@xinu.at>2016-06-07 11:44:03 +0200
committerFlorian Pritz <bluewind@xinu.at>2016-06-07 11:44:03 +0200
commit819b0abb8e76afadb2768d24f4eae645c8d4f2d3 (patch)
tree9413583153bed7c77d039075d49cf80b51c5075f
parent521b4d7df3f4b41b933e39b00fa43ba79edefd13 (diff)
mmultipaste->valid_id: Detect empty multipastes as invalid
Signed-off-by: Florian Pritz <bluewind@xinu.at>
-rw-r--r--application/models/mmultipaste.php4
1 files changed, 4 insertions, 0 deletions
diff --git a/application/models/mmultipaste.php b/application/models/mmultipaste.php
index 0185e8c7f..deb01978e 100644
--- a/application/models/mmultipaste.php
+++ b/application/models/mmultipaste.php
@@ -80,6 +80,10 @@ class Mmultipaste extends CI_Model {
public function valid_id($id)
{
$files = $this->get_files($id);
+ if (count($files) === 0) {
+ return false;
+ }
+
foreach ($files as $file) {
if (!$this->mfile->valid_id($file["id"])) {
return false;