diff --git a/htdocs/expedition/class/expedition.class.php b/htdocs/expedition/class/expedition.class.php index 7454e0b7832..dac6efee52c 100644 --- a/htdocs/expedition/class/expedition.class.php +++ b/htdocs/expedition/class/expedition.class.php @@ -3050,7 +3050,8 @@ class ExpeditionLigne extends CommonObjectLine // update lot if (!empty($batch) && isModEnabled('productbatch')) { - dol_syslog(get_class($this)."::update expedition batch id=$expedition_batch_id, batch_id=$batch_id, batch=$batch"); + $batch_id_str = $batch_id ?? 'null'; + dol_syslog(get_class($this)."::update expedition batch id=$expedition_batch_id, batch_id=$batch_id_str, batch=$batch"); if (empty($batch_id) || empty($this->fk_product)) { dol_syslog(get_class($this).'::update missing fk_origin_stock (batch_id) and/or fk_product', LOG_ERR);