When setting a PHP ini value like `post_max_size`,
the value may not have a modifier (e.g. "M") and
for "0" input, the function return empty string.
Signed-off-by: Jerome Jutteau <jerome@jutteau.fr>
$modifier = substr($value, -1);
$bytes = substr($value, 0, -1);
switch (strtoupper($modifier)) {
+ default:
+ return intval($value);
+ break;
case 'P':
$bytes *= 1024;
// no break
}
return $size;
}
-
$size = min(
jirafeau_get_max_upload_size_bytes(),
$max_upload_chunk_size_bytes