summaryrefslogtreecommitdiffstats
path: root/application/service/files.php
diff options
context:
space:
mode:
authorFlorian Pritz <bluewind@xinu.at>2022-04-10 12:07:42 +0200
committerFlorian Pritz <bluewind@xinu.at>2022-04-10 14:44:35 +0200
commit4d59c3489042bab078c4a20ecfb3fde6aeb119cc (patch)
tree10c89bce48c8efdb39b2548cf44898905a6620b1 /application/service/files.php
parent37bd983bf0cc956a6c814f161bec1061e9cc9572 (diff)
feat(PHP8.1): Add null-checks
Signed-off-by: Florian Pritz <bluewind@xinu.at>
Diffstat (limited to 'application/service/files.php')
-rw-r--r--application/service/files.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/application/service/files.php b/application/service/files.php
index a98e0873f..a21b1d65c 100644
--- a/application/service/files.php
+++ b/application/service/files.php
@@ -242,7 +242,7 @@ class files {
}
}
- $filesize = filesize($file['tmp_name']);
+ $filesize = isset($file['tmp_name']) ? filesize($file['tmp_name']) : 0;
if ($filesize > $CI->config->item('upload_max_size')) {
$error_message = "File too big";
}