mirror of
https://github.com/wintercms/winter.git
synced 2024-06-28 05:33:29 +02:00
Fix case sensitivity issue with determining "upload_max_filesize" size
Fixes https://github.com/wintercms/winter/issues/788
This commit is contained in:
parent
ad427a621a
commit
02cbd8654a
@ -518,7 +518,7 @@ class FileUpload extends FormWidgetBase
|
||||
{
|
||||
$size = ini_get('upload_max_filesize');
|
||||
if (preg_match('/^([\d\.]+)([KMG])$/i', $size, $match)) {
|
||||
$pos = array_search($match[2], ['K', 'M', 'G']);
|
||||
$pos = array_search(strtoupper($match[2]), ['K', 'M', 'G']);
|
||||
if ($pos !== false) {
|
||||
$size = $match[1] * pow(1024, $pos + 1);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user