瀏覽代碼

fix php8.0 warnings

lmarcouiller 3 年之前
父節點
當前提交
171ecaa81d
共有 4 個文件被更改,包括 5 次插入2 次删除
  1. 1 0
      htdocs/reception/card.php
  2. 1 1
      htdocs/reception/class/reception.class.php
  3. 1 0
      htdocs/reception/index.php
  4. 2 1
      htdocs/reception/list.php

+ 1 - 0
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

+ 1 - 1
htdocs/reception/class/reception.class.php

@@ -1120,7 +1120,7 @@ class Reception extends CommonObject
 		$result = '';
 		$label = img_picto('', $this->picto).' <u>'.$langs->trans("Reception").'</u>';
 		$label .= '<br><b>'.$langs->trans('Ref').':</b> '.$this->ref;
-		$label .= '<br><b>'.$langs->trans('RefSupplier').':</b> '.($this->ref_supplier ? $this->ref_supplier : $this->ref_client);
+		$label .= '<br><b>'.$langs->trans('RefSupplier').':</b> '.($this->ref_supplier ? $this->ref_supplier : '');
 
 		$url = DOL_URL_ROOT.'/reception/card.php?id='.$this->id;
 

+ 1 - 0
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;
 }

+ 2 - 1
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 "</tr>\n";
 
 $i = 0;
 $totalarray = array();
+$totalarray['nbfield'] = 0;
 while ($i < min($num, $limit)) {
 	$obj = $db->fetch_object($resql);