From c1e3b144dd2797039448fd968de008e9f07cf82e Mon Sep 17 00:00:00 2001 From: liedekef Date: Thu, 4 Jan 2007 20:57:11 +0000 Subject: [PATCH] fix bug #18621 --- htdocs/facture.class.php | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/htdocs/facture.class.php b/htdocs/facture.class.php index 73b7090ae27..3004470d4c1 100644 --- a/htdocs/facture.class.php +++ b/htdocs/facture.class.php @@ -5,6 +5,7 @@ * Copyright (C) 2004 Benoit Mortier * Copyright (C) 2005 Marc Barilley / Ocebo * Copyright (C) 2006 Andre Cianfarani + * Copyright (C) 2007 Franky Van Liedekerke * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -1786,11 +1787,13 @@ class Facture extends CommonObject $resql=$this->db->query($sql); if ($resql) { - $obj = $this->db->fetch_object($resql); - if ($obj) + $num = $this->db->num_rows(); + $i = 0; + while ($i < $num) { - // Si il y en a - $idarray[]=$obj->rowid; + $row = $this->db->fetch_row($i); + $idarray[]=$row[0]; + $i++; } } else