diff options
Diffstat (limited to 'include/text.php')
-rw-r--r-- | include/text.php | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/include/text.php b/include/text.php index d7c91e430..c61c5fbd4 100644 --- a/include/text.php +++ b/include/text.php @@ -1826,7 +1826,9 @@ function lang_selector() { function engr_units_to_bytes ($size_str) { - switch (substr ($size_str, -1)) { + if(! $size_str) + return $size_str; + switch (substr(trim($size_str), -1)) { case 'M': case 'm': return (int)$size_str * 1048576; case 'K': case 'k': return (int)$size_str * 1024; case 'G': case 'g': return (int)$size_str * 1073741824; |