aboutsummaryrefslogtreecommitdiff
path: root/src/Models
diff options
context:
space:
mode:
Diffstat (limited to 'src/Models')
-rw-r--r--src/Models/Attachment.php3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/Models/Attachment.php b/src/Models/Attachment.php
index bbbd0ee..b627d33 100644
--- a/src/Models/Attachment.php
+++ b/src/Models/Attachment.php
@@ -200,6 +200,9 @@ class Attachment
$inserts = [];
foreach (self::transposeUploadsArray($uploads) as $upload) {
+ if ($upload["error"] !== UPLOAD_ERR_OK)
+ continue;
+
$hash = hash_file(self::HASH_ALGO, $upload["tmp_name"]);
if (self::hasHash($db, $hash)) {
unlink($upload["tmp_name"]);