From 972a2db3a365752d958ade11ef24083c1e5f9653 Mon Sep 17 00:00:00 2001
From: Philippe
Date: Thu, 8 Sep 2016 11:40:39 +0200
Subject: [PATCH] No initialisation of the array before filling it. May cause
some trouble when fetch is call several times and lines added or deleted
---
htdocs/fourn/class/fournisseur.commande.class.php | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/htdocs/fourn/class/fournisseur.commande.class.php b/htdocs/fourn/class/fournisseur.commande.class.php
index 31ff52886c6..523f89862c8 100644
--- a/htdocs/fourn/class/fournisseur.commande.class.php
+++ b/htdocs/fourn/class/fournisseur.commande.class.php
@@ -243,7 +243,8 @@ class CommandeFournisseur extends CommonOrder
$this->fetch_optionals($this->id,$extralabels);
if ($this->statut == 0) $this->brouillon = 1;
-
+
+ $this->lines=array();
$sql = "SELECT l.rowid, l.ref as ref_supplier, l.fk_product, l.product_type, l.label, l.description,";
$sql.= " l.qty,";