Skip to content

Commit

Permalink
Added fix to the addSystemVarSettings so that if post_max_size is se…
Browse files Browse the repository at this point in the history
…t to 0 (unlimited) then max_upload_filesize should be the limiter (#538)
  • Loading branch information
DanielLaranjeira063 committed May 24, 2024
1 parent ad5d6da commit 4a9302f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Controller/Admin/IndexController.php
Original file line number Diff line number Diff line change
Expand Up @@ -313,7 +313,7 @@ protected function addSystemVarSettings(array &$settings): static
// upload limit
$max_upload = filesize2bytes(ini_get('upload_max_filesize') . 'B');
$max_post = filesize2bytes(ini_get('post_max_size') . 'B');
$upload_mb = min($max_upload, $max_post);
$upload_mb = min($max_upload, $max_post) ?: $max_upload;

$settings['upload_max_filesize'] = (int) $upload_mb;

Expand Down

0 comments on commit 4a9302f

Please sign in to comment.