Skip to content

Commit 4a9302f

Browse files
Added fix to the addSystemVarSettings so that if post_max_size is set to 0 (unlimited) then max_upload_filesize should be the limiter (#538)
1 parent ad5d6da commit 4a9302f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Controller/Admin/IndexController.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -313,7 +313,7 @@ protected function addSystemVarSettings(array &$settings): static
313313
// upload limit
314314
$max_upload = filesize2bytes(ini_get('upload_max_filesize') . 'B');
315315
$max_post = filesize2bytes(ini_get('post_max_size') . 'B');
316-
$upload_mb = min($max_upload, $max_post);
316+
$upload_mb = min($max_upload, $max_post) ?: $max_upload;
317317

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

0 commit comments

Comments
 (0)