FIX avoid php warning

This commit is contained in:
Regis Houssin 2024-12-05 11:04:38 +01:00
parent 5236372921
commit 3f1e4e27ff

View file

@ -29,7 +29,7 @@ if (empty($conf) || !is_object($conf)) {
}
// DDOS protection
$size = (int) $_SERVER['CONTENT_LENGTH'];
$size = (int) ($_SERVER['CONTENT_LENGTH'] ?? 0);
if ($size > 10000) {
$langs->loadLangs(array("errors", "install"));
httponly_accessforbidden('<center>'.$langs->trans("ErrorRequestTooLarge").'<br><a href="'.DOL_URL_ROOT.'">'.$langs->trans("ClickHereToGoToApp").'</a></center>', 413, 1);