update code towards php8 compliance

This commit is contained in:
Philippe GRAND 2022-10-06 16:41:56 +02:00
parent be10cdee95
commit 9d35e3aabe

View File

@ -79,7 +79,7 @@ if (GETPOST('sendit', 'alpha') && !empty($conf->global->MAIN_UPLOAD_DOC) && !emp
}
$allowoverwrite = (GETPOST('overwritefile', 'int') ? 1 : 0);
if (!empty($upload_dirold) && !empty($conf->global->PRODUCT_USE_OLD_PATH_FOR_PHOTO)) {
if (!empty($upload_dirold) && getDolGlobalInt('PRODUCT_USE_OLD_PATH_FOR_PHOTO')) {
$result = dol_add_file_process($upload_dirold, $allowoverwrite, 1, 'userfile', GETPOST('savingdocmask', 'alpha'), null, '', $generatethumbs, $object);
} elseif (!empty($upload_dir)) {
$result = dol_add_file_process($upload_dir, $allowoverwrite, 1, 'userfile', GETPOST('savingdocmask', 'alpha'), null, '', $generatethumbs, $object);