Fix php 8 errors

This commit is contained in:
ptibogxiv 2023-01-08 17:07:59 +01:00 committed by GitHub
parent 9877f8281f
commit f08407e597
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -52,7 +52,7 @@ $ref = GETPOST('ref', 'alpha');
$action = GETPOST('action', 'aZ09');
$cancel = GETPOST('cancel', 'alpha');
$confirm = GETPOST('confirm', 'alpha');
$socid = GETPOST('socid', 'int');
$amount = price2num(GETPOST('amount', 'alphanohtml'), 'MT');
$donation_date = dol_mktime(12, 0, 0, GETPOST('remonth'), GETPOST('reday'), GETPOST('reyear'));
$projectid = (GETPOST('projectid') ? GETPOST('projectid', 'int') : 0);
@ -63,6 +63,13 @@ if ($id > 0 || $ref) {
$object->fetch($id, $ref);
}
if (!empty($socid) && $socid > 0) {
$soc = new Societe($db);
if ($socid > 0) {
$soc->fetch($socid);
}
}
$extrafields = new ExtraFields($db);
// fetch optionals attributes and labels