From 031254420e349b4135fb9e46c9736555a6fcce85 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sat, 28 Feb 2004 20:31:25 +0000 Subject: [PATCH] =?UTF-8?q?Si=20le=20user=20de=20cr=E9ation=20ou=20modific?= =?UTF-8?q?ation=20sont=20null=20(c'est=20le=20cas=20sur=20les=20vieux=20e?= =?UTF-8?q?nregistrements=20de=20paiement),=20alors=20on=20ne=20recherche?= =?UTF-8?q?=20pas=20son=20nom=20(requete=20vou=E9e=20=E0=20l'=E9chec).?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- htdocs/paiement.class.php | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/htdocs/paiement.class.php b/htdocs/paiement.class.php index a2c3c0401d1..06cf3b0ce2e 100644 --- a/htdocs/paiement.class.php +++ b/htdocs/paiement.class.php @@ -1,6 +1,6 @@ - * Copyright (C) 2004 Laurent Destailleur + * Copyright (C) 2004 Laurent Destailleur * * 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 @@ -220,15 +220,17 @@ class Paiement $this->id = $obj->idp; - $cuser = new User($this->db, $obj->fk_user_creat); - $cuser->fetch(); + if ($obj->fk_user_creat) { + $cuser = new User($this->db, $obj->fk_user_creat); + $cuser->fetch(); + $this->user_creation = $cuser; + } - $this->user_creation = $cuser; - - $muser = new User($this->db, $obj->fk_user_modif); - $muser->fetch(); - - $this->user_modification = $muser; + if ($obj->fk_user_modif) { + $muser = new User($this->db, $obj->fk_user_modif); + $muser->fetch(); + $this->user_modification = $muser; + } $this->date_creation = $obj->datec; $this->date_modification = $obj->tms;