expedition setting php v8 warning

This commit is contained in:
BENKE Charlene 2022-06-20 15:55:52 +02:00 committed by GitHub
parent 5ef2f1c69f
commit c4793e71c7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -80,7 +80,8 @@ class mod_expedition_ribera extends ModelNumRefExpedition
$tooltip .= $langs->trans("GenericMaskCodes5");
$texte .= '<tr><td>'.$langs->trans("Mask").':</td>';
$texte .= '<td class="right">'.$form->textwithpicto('<input type="text" class="flat minwidth175" name="maskexpedition" value="'.$conf->global->EXPEDITION_RIBERA_MASK.'">', $tooltip, 1, 1).'</td>';
$mask= !empty($conf->global->EXPEDITION_RIBERA_MASK)?$conf->global->EXPEDITION_RIBERA_MASK:"";
$texte .= '<td class="right">'.$form->textwithpicto('<input type="text" class="flat minwidth175" name="maskexpedition" value="'.$mask.'">', $tooltip, 1, 1).'</td>';
$texte .= '<td class="left" rowspan="2">&nbsp; <input type="submit" class="button button-edit" name="Button" value="'.$langs->trans("Modify").'"></td>';
$texte .= '</tr>';
$texte .= '</table>';
@ -125,12 +126,13 @@ class mod_expedition_ribera extends ModelNumRefExpedition
require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php';
$mask = $conf->global->EXPEDITION_RIBERA_MASK;
if (!$mask) {
if (empty($conf->global->EXPEDITION_RIBERA_MASK)) {
$this->error = 'NotConfigured';
return 0;
}
} else
$mask = $conf->global->EXPEDITION_RIBERA_MASK;
$date = $shipment->date_expedition;