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;