From 9a666b265f922e28f8e23e8f895bdeca74b5a3d0 Mon Sep 17 00:00:00 2001 From: John BOTELLA Date: Mon, 28 Jan 2019 11:53:19 +0100 Subject: [PATCH] Use an other test --- htdocs/fourn/class/fournisseur.commande.class.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/htdocs/fourn/class/fournisseur.commande.class.php b/htdocs/fourn/class/fournisseur.commande.class.php index ef22d5bd8f8..a4283ee5162 100644 --- a/htdocs/fourn/class/fournisseur.commande.class.php +++ b/htdocs/fourn/class/fournisseur.commande.class.php @@ -3016,9 +3016,11 @@ class CommandeFournisseurLigne extends CommonOrderLine $result = $this->db->query($sql); if ($result) { - if ($this->db->num_rows($result)) + $objp = $this->db->fetch_object($result); + + if (!empty($objp)) { - $objp = $this->db->fetch_object($result); + $this->rowid = $objp->rowid; $this->id = $objp->rowid;