From 4d59c3489042bab078c4a20ecfb3fde6aeb119cc Mon Sep 17 00:00:00 2001 From: Florian Pritz Date: Sun, 10 Apr 2022 12:07:42 +0200 Subject: feat(PHP8.1): Add null-checks Signed-off-by: Florian Pritz --- application/service/files.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'application/service') 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"; } -- cgit v1.2.3-24-g4f1b