From bf460526c055e5c44cb1f376614e0d3f16145eca Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sun, 20 Jun 2021 00:27:24 +0200 Subject: [PATCH] Add warning when submiting file larger than post_max_size. --- htdocs/core/actions_linkedfiles.inc.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/htdocs/core/actions_linkedfiles.inc.php b/htdocs/core/actions_linkedfiles.inc.php index 750ed2b2d9a..e0bb6174948 100644 --- a/htdocs/core/actions_linkedfiles.inc.php +++ b/htdocs/core/actions_linkedfiles.inc.php @@ -26,6 +26,9 @@ //var_dump($upload_dir); //var_dump($upload_dirold); +if (GETPOST('uploadform', 'int') && empty($_FILES)) { + print "Error: The PHP parameter 'post_max_size' is too low. All POST parameters and FILES were set to empty.\n"; +} // Submit file/link if (GETPOST('sendit', 'alpha') && !empty($conf->global->MAIN_UPLOAD_DOC) && (!isset($permissiontoadd) || $permissiontoadd)) {