Merge pull request #23456 from ptibogxiv/patch-77

Fix php 8 errors
This commit is contained in:
Laurent Destailleur 2023-01-11 20:59:39 +01:00 committed by GitHub
commit d57b21eeb2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 10 additions and 1 deletions

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

View File

@ -59,6 +59,7 @@ $search_status = (GETPOST("search_status", 'intcomma') != '') ? GETPOST("search_
$search_all = trim((GETPOST('search_all', 'alphanohtml') != '') ?GETPOST('search_all', 'alphanohtml') : GETPOST('sall', 'alphanohtml'));
$search_ref = GETPOST('search_ref', 'alpha');
$search_company = GETPOST('search_company', 'alpha');
$search_thirdparty = GETPOST('search_thirdparty', 'alpha');
$search_name = GETPOST('search_name', 'alpha');
$search_amount = GETPOST('search_amount', 'alpha');
$optioncss = GETPOST('optioncss', 'alpha');
@ -71,6 +72,7 @@ if (GETPOST('button_removefilter_x', 'alpha') || GETPOST('button_removefilter.x'
$search_all = "";
$search_ref = "";
$search_company = "";
$search_thirdparty = "";
$search_name = "";
$search_amount = "";
$search_status = '';