Fix fetchCommon should return 0 iso error if not found
This commit is contained in:
parent
d6ed968c51
commit
00185bd9d4
@ -6299,23 +6299,15 @@ abstract class CommonObject
|
||||
$res = $this->db->query($sql);
|
||||
if ($res)
|
||||
{
|
||||
if ($obj = $this->db->fetch_object($res))
|
||||
$obj = $this->db->fetch_object($res);
|
||||
if ($obj)
|
||||
{
|
||||
if ($obj)
|
||||
{
|
||||
$this->setVarsFromFetchObj($obj);
|
||||
return $this->id;
|
||||
}
|
||||
else
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
$this->setVarsFromFetchObj($obj);
|
||||
return $this->id;
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->error = $this->db->lasterror();
|
||||
$this->errors[] = $this->error;
|
||||
return -1;
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
else
|
||||
|
||||
Loading…
Reference in New Issue
Block a user