From 171ecaa81d966a11d990a424d317e0bbbe5c7a0a Mon Sep 17 00:00:00 2001 From: lmarcouiller Date: Wed, 1 Dec 2021 15:40:53 +0100 Subject: [PATCH] fix php8.0 warnings --- htdocs/reception/card.php | 1 + htdocs/reception/class/reception.class.php | 2 +- htdocs/reception/index.php | 1 + htdocs/reception/list.php | 3 ++- 4 files changed, 5 insertions(+), 2 deletions(-) diff --git a/htdocs/reception/card.php b/htdocs/reception/card.php index 5b8727a3f0c..d9f8da644ea 100644 --- a/htdocs/reception/card.php +++ b/htdocs/reception/card.php @@ -85,6 +85,7 @@ if (empty($origin_id)) { } $ref = GETPOST('ref', 'alpha'); $line_id = GETPOST('lineid', 'int') ?GETPOST('lineid', 'int') : ''; +$facid = GETPOST('facid', 'int'); $action = GETPOST('action', 'alpha'); //Select mail models is same action as presend diff --git a/htdocs/reception/class/reception.class.php b/htdocs/reception/class/reception.class.php index 954e7f192cd..8024bac4f36 100644 --- a/htdocs/reception/class/reception.class.php +++ b/htdocs/reception/class/reception.class.php @@ -1120,7 +1120,7 @@ class Reception extends CommonObject $result = ''; $label = img_picto('', $this->picto).' '.$langs->trans("Reception").''; $label .= '
'.$langs->trans('Ref').': '.$this->ref; - $label .= '
'.$langs->trans('RefSupplier').': '.($this->ref_supplier ? $this->ref_supplier : $this->ref_client); + $label .= '
'.$langs->trans('RefSupplier').': '.($this->ref_supplier ? $this->ref_supplier : ''); $url = DOL_URL_ROOT.'/reception/card.php?id='.$this->id; diff --git a/htdocs/reception/index.php b/htdocs/reception/index.php index 580de4aca1a..ed5f3a715d2 100644 --- a/htdocs/reception/index.php +++ b/htdocs/reception/index.php @@ -39,6 +39,7 @@ $langs->loadLangs(array("orders", "receptions")); $reception = new Reception($db); // Security check +$socid = ''; if ($user->socid) { $socid = $user->socid; } diff --git a/htdocs/reception/list.php b/htdocs/reception/list.php index 5a6db5b53b1..00c59e47336 100644 --- a/htdocs/reception/list.php +++ b/htdocs/reception/list.php @@ -479,7 +479,7 @@ $parameters = array(); $reshook = $hookmanager->executeHooks('printFieldListSelect', $parameters); // Note that $action and $object may have been modified by hook $sql .= $hookmanager->resPrint; $sql .= " FROM ".MAIN_DB_PREFIX."reception as e"; -if (is_array($extrafields->attributes[$object->table_element]['label']) && count($extrafields->attributes[$object->table_element]['label'])) { +if (!empty($extrafields->attributes[$object->table_element]['label']) && is_array($extrafields->attributes[$object->table_element]['label']) && count($extrafields->attributes[$object->table_element]['label'])) { $sql .= " LEFT JOIN ".MAIN_DB_PREFIX.$object->table_element."_extrafields as ef on (e.rowid = ef.fk_object)"; } $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."societe as s ON s.rowid = e.fk_soc"; @@ -878,6 +878,7 @@ print "\n"; $i = 0; $totalarray = array(); +$totalarray['nbfield'] = 0; while ($i < min($num, $limit)) { $obj = $db->fetch_object($resql);