Skip to content

Commit

Permalink
Null check for e_file::file_size_decode()
Browse files Browse the repository at this point in the history
  • Loading branch information
Deltik committed Jan 18, 2020
1 parent d2d0105 commit 15de2e2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion e107_handlers/file_class.php
Original file line number Diff line number Diff line change
Expand Up @@ -848,7 +848,7 @@ function file_size_decode($source, $compare = 0, $action = '')
$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;

Expand Down

0 comments on commit 15de2e2

Please sign in to comment.