mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-18 07:23:13 +00:00
PHRAS-2651_event-to-message_4.1
fix for php7.1 !!! WIP !!!
This commit is contained in:
@@ -367,15 +367,17 @@ class UploadController extends Controller
|
||||
$postMaxSize = PHP_INT_MAX;
|
||||
}
|
||||
|
||||
$r = 0;
|
||||
switch (strtolower(substr($postMaxSize, -1))) {
|
||||
/** @noinspection PhpMissingBreakStatementInspection */
|
||||
case 'g':
|
||||
$postMaxSize *= 1024;
|
||||
$r += 10;
|
||||
/** @noinspection PhpMissingBreakStatementInspection */
|
||||
case 'm':
|
||||
$postMaxSize *= 1024;
|
||||
$r += 10;
|
||||
case 'k':
|
||||
$postMaxSize *= 1024;
|
||||
$r += 10;
|
||||
$postMaxSize = ((int)($postMaxSize))<<$r;
|
||||
}
|
||||
|
||||
return min(UploadedFile::getMaxFilesize(), (int) $postMaxSize);
|
||||
|
Reference in New Issue
Block a user