FIX : better test on fetch
This commit is contained in:
parent
0c4e5a6487
commit
bfc7265cbc
@ -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(!empty($lthirdparty->error))
|
||||
{
|
||||
$this->error=$lthirdparty->error;
|
||||
$error++;
|
||||
|
||||
@ -1485,7 +1485,7 @@ class User extends CommonObject
|
||||
$adh=new Adherent($this->db);
|
||||
$result=$adh->fetch($this->fk_member);
|
||||
|
||||
if ($result > 0 && $adh->entity == $conf->entity)
|
||||
if ($result > 0)
|
||||
{
|
||||
$adh->firstname=$this->firstname;
|
||||
$adh->lastname=$this->lastname;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user