diff --git a/htdocs/adherents/class/adherent.class.php b/htdocs/adherents/class/adherent.class.php index c7807bc6b00..ac3e6890cf4 100644 --- a/htdocs/adherents/class/adherent.class.php +++ b/htdocs/adherents/class/adherent.class.php @@ -578,7 +578,7 @@ class Adherent extends CommonObject $lthirdparty=new Societe($this->db); $result=$lthirdparty->fetch($this->fk_soc); - if ($result >= 0) + if ($result > 0) { $lthirdparty->address=$this->address; $lthirdparty->zip=$this->zip; @@ -600,7 +600,7 @@ class Adherent extends CommonObject $error++; } } - else + elseif ($result < 0) { $this->error=$lthirdparty->error; $error++; @@ -689,7 +689,6 @@ class Adherent extends CommonObject $this->db->rollback(); return -1; } - } /** diff --git a/htdocs/user/class/user.class.php b/htdocs/user/class/user.class.php index ef2b828f6e5..1b414795c24 100644 --- a/htdocs/user/class/user.class.php +++ b/htdocs/user/class/user.class.php @@ -1485,7 +1485,7 @@ class User extends CommonObject $adh=new Adherent($this->db); $result=$adh->fetch($this->fk_member); - if ($result >= 0) + if ($result > 0) { $adh->firstname=$this->firstname; $adh->lastname=$this->lastname; @@ -1520,7 +1520,7 @@ class User extends CommonObject $error++; } } - else + elseif ($result < 0) { $this->error=$adh->error; $this->errors=$adh->errors;