summaryrefslogtreecommitdiffstats
path: root/application/models
diff options
context:
space:
mode:
Diffstat (limited to 'application/models')
-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;