From 15de2e233b45fa854d3d3e406305698594c10fe5 Mon Sep 17 00:00:00 2001 From: Nick Liu Date: Sat, 18 Jan 2020 00:29:44 +0100 Subject: [PATCH] Null check for e_file::file_size_decode() --- e107_handlers/file_class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/e107_handlers/file_class.php b/e107_handlers/file_class.php index 334771349..d77298735 100644 --- a/e107_handlers/file_class.php +++ b/e107_handlers/file_class.php @@ -848,7 +848,7 @@ class e_file $source = trim($source); $source = strtoupper($source); - list($val, $unit) = preg_split('#(?<=\d)(?=[a-z])#i', $source); + list($val, $unit) = array_pad(preg_split('#(?<=\d)(?=[a-z])#i', $source), 2, ''); $val = (int) $val;