Fix: Test pour éviter erreurs

This commit is contained in:
Laurent Destailleur 2005-12-09 23:31:03 +00:00
parent 64ee49be81
commit 22565a5cad

View File

@ -984,12 +984,12 @@ class Propal
* \remarks Fonction plus lourde que commande_liste_array * \remarks Fonction plus lourde que commande_liste_array
* \sa commande_liste_array * \sa commande_liste_array
*/ */
function associated_orders () function associated_orders()
{ {
$ga = array(); $ga = array();
$sql = "SELECT fk_commande FROM ".MAIN_DB_PREFIX."co_pr"; $sql = "SELECT fk_commande FROM ".MAIN_DB_PREFIX."co_pr";
$sql .= " WHERE fk_propale = " . $this->id; $sql.= " WHERE fk_propale = " . $this->id;
if ($this->db->query($sql) ) if ($this->db->query($sql) )
{ {
$nump = $this->db->num_rows(); $nump = $this->db->num_rows();
@ -1001,8 +1001,12 @@ class Propal
{ {
$obj = $this->db->fetch_object(); $obj = $this->db->fetch_object();
$order=new Commande($this->db); $order=new Commande($this->db);
if ($obj->fk_commande)
{
$order->fetch($obj->fk_commande); $order->fetch($obj->fk_commande);
$ga[$i] = $order; $ga[$i] = $order;
}
$i++; $i++;
} }
} }