diff --git a/htdocs/product/stock/class/productstockentrepot.class.php b/htdocs/product/stock/class/productstockentrepot.class.php index 6b12af88c7a..740afcb5f04 100644 --- a/htdocs/product/stock/class/productstockentrepot.class.php +++ b/htdocs/product/stock/class/productstockentrepot.class.php @@ -93,8 +93,8 @@ class ProductStockEntrepot extends CommonObject // Clean parameters - if (isset($this->fk_product)) $this->fk_product = trim($this->fk_product); - if (isset($this->fk_entrepot)) $this->fk_entrepot = trim($this->fk_entrepot); + if (isset($this->fk_product)) $this->fk_product = (int) $this->fk_product; + if (isset($this->fk_entrepot)) $this->fk_entrepot = (int) $this->fk_entrepot; if (isset($this->seuil_stock_alerte)) $this->seuil_stock_alerte = trim($this->seuil_stock_alerte); if (isset($this->desiredstock)) $this->desiredstock = trim($this->desiredstock); if (isset($this->import_key)) $this->import_key = trim($this->import_key); @@ -317,8 +317,8 @@ class ProductStockEntrepot extends CommonObject // Clean parameters - if (isset($this->fk_product)) $this->fk_product = trim($this->fk_product); - if (isset($this->fk_entrepot)) $this->fk_entrepot = trim($this->fk_entrepot); + if (isset($this->fk_product)) $this->fk_product = (int) $this->fk_product; + if (isset($this->fk_entrepot)) $this->fk_entrepot = (int) $this->fk_entrepot; if (isset($this->seuil_stock_alerte)) $this->seuil_stock_alerte = trim($this->seuil_stock_alerte); if (isset($this->desiredstock)) $this->desiredstock = trim($this->desiredstock); if (isset($this->import_key)) $this->import_key = trim($this->import_key); @@ -575,8 +575,8 @@ class ProductStockEntrepot extends CommonObject $this->id = 0; $this->tms = ''; - $this->fk_product = ''; - $this->fk_entrepot = ''; + $this->fk_product = null; + $this->fk_entrepot = null; $this->seuil_stock_alerte = ''; $this->desiredstock = ''; $this->import_key = '';