Check if upload_max_filesize is not empty

This commit is contained in:
Laurent Destailleur 2026-02-11 02:16:24 +01:00 committed by GitHub
parent 602bcc5361
commit 55c33edeec
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -187,7 +187,7 @@ print '</tr>';
print '<tr class="oddeven">';
print '<td>'.$langs->trans("MaxSizeForUploadedFiles").'.';
$max = @ini_get('upload_max_filesize');
if (isset($max)) {
if (!empty($max)) {
print '<br><span class="opacitymedium">'.$langs->trans("MustBeLowerThanPHPLimit", ((int) $max) * 1024, $langs->trans("Kb")).'.</span>';
} else {
print ' '.$langs->trans("NoMaxSizeByPHPLimit").'.';