add escape to sql

This commit is contained in:
jpb 2021-07-20 16:17:17 +02:00
parent 953e311509
commit 875167d593

View File

@ -747,7 +747,7 @@ class Product extends CommonObject
$sql .= ", ".((empty($this->status_batch) || $this->status_batch < 0) ? '0' : $this->status_batch);
$sql .= ", '".$this->db->escape($this->batch_mask)."'";
$sql .= ", ".(!$this->fk_unit ? 'NULL' : $this->fk_unit);
$sql .= ", '".$this->mandatory_period."'";
$sql .= ", '".$this->db->escape($this->mandatory_period)."'";
$sql .= ")";
dol_syslog(get_class($this)."::Create", LOG_DEBUG);