Commit 8a587d0a authored by Ben Bradshaw's avatar Ben Bradshaw
Browse files

[#3261] If no suffix is provided in get_real_size assume bytes

(cherry picked from commit b9609391)
parent 432bcab8
......@@ -1862,6 +1862,9 @@ function get_real_size($size=0) {
if (!$size) {
return 0;
}
// If there is no suffix then assume bytes
else if (is_numeric($size)) return (int)$size;
$scan = array(
'MB' => 1048576,
'Mb' => 1048576,
......@@ -1880,7 +1883,7 @@ function get_real_size($size=0) {
}
}
throw new SystemException('get_real_size called without valid size suffix');
throw new SystemException('get_real_size called without valid size');
}
/**
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment