Merge pull request #10450 from atm-gauthier/8.0_fIX_fetch_member

FIX : wrong tests on fetch
This commit is contained in:
Laurent Destailleur 2019-02-03 19:25:25 +01:00 committed by GitHub
commit 4538d13add
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 5 deletions

View File

@ -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;
}
}
/**

View File

@ -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;