diff --git a/htdocs/product/inventory/class/inventory.class.php b/htdocs/product/inventory/class/inventory.class.php index 97c11a0370d..0ad970a7d40 100644 --- a/htdocs/product/inventory/class/inventory.class.php +++ b/htdocs/product/inventory/class/inventory.class.php @@ -294,7 +294,7 @@ class Inventory extends CommonObject } if ($this->include_sub_warehouse>0 && $conf->global->INVENTORY_INCLUDE_SUB_WAREHOUSE) { $this->getchildWarehouse($this->fk_warehouse, $TChildWarehouses); - $sql .= " OR ps.fk_entrepot IN (".implode(',', $TChildWarehouses).")"; + $sql .= " OR ps.fk_entrepot IN (".filter_var(implode(',', $TChildWarehouses),FILTER_SANITIZE_STRING).")"; } $sql .= ')';