Fix : fix php 8.0 warnings

This commit is contained in:
lmarcouiller 2022-02-17 10:22:58 +01:00
parent 131ae92cc6
commit aea9c2e427
4 changed files with 7 additions and 1 deletions

View File

@ -65,6 +65,9 @@ if (GETPOST('actioncode', 'array')) {
}
$search_agenda_label = GETPOST('search_agenda_label');
// Get object canvas (By default, this is not defined, so standard usage of dolibarr)
$objcanvas = null;
// Security check
$result = restrictedArea($user, 'adherent', $id);

View File

@ -55,6 +55,7 @@ $id = GETPOST('id') ?GETPOST('id', 'int') : $rowid;
$typeid = GETPOST('typeid', 'int');
$userid = GETPOST('userid', 'int');
$socid = GETPOST('socid', 'int');
$ref = GETPOST('ref', 'alpha');
if (!empty($conf->mailmanspip->enabled)) {
include_once DOL_DOCUMENT_ROOT.'/mailmanspip/class/mailmanspip.class.php';

View File

@ -40,6 +40,8 @@ require_once DOL_DOCUMENT_ROOT.'/accountancy/class/accountingjournal.class.php';
$langs->loadLangs(array("companies", "bills", "members", "users", "mails", 'other'));
$optioncss = GETPOST('optioncss', 'aZ'); // Option for the css output (always '' except when 'print')
$action = GETPOST('action', 'aZ09');
$confirm = GETPOST('confirm', 'alpha');
$id = GETPOST('rowid', 'int') ?GETPOST('rowid', 'int') : GETPOST('id', 'int');

View File

@ -31,7 +31,7 @@ if (empty($conf) || !is_object($conf)) {
}
// DDOS protection
$size = (int) $_SERVER['CONTENT_LENGTH'];
$size = (int) !empty($_SERVER['CONTENT_LENGTH'])?$_SERVER['CONTENT_LENGTH']:0;
if ($size > 10000) {
http_response_code(413);
$langs->loadLangs(array("errors", "install"));