Merge pull request #10450 from atm-gauthier/8.0_fIX_fetch_member
FIX : wrong tests on fetch
This commit is contained in:
commit
4538d13add
@ -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;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@ -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;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user