From 393303fe31d816cf8c0f4e8d0b79a08fa9d97b73 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Wed, 17 Oct 2018 20:17:43 +0200 Subject: [PATCH] do not trim int --- .../stock/class/productstockentrepot.class.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) 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 = '';