Fix fetchCommon should return 0 iso error if not found

This commit is contained in:
fappels 2018-01-15 11:21:24 +01:00
parent d6ed968c51
commit 00185bd9d4

View File

@ -6299,8 +6299,7 @@ abstract class CommonObject
$res = $this->db->query($sql); $res = $this->db->query($sql);
if ($res) if ($res)
{ {
if ($obj = $this->db->fetch_object($res)) $obj = $this->db->fetch_object($res);
{
if ($obj) if ($obj)
{ {
$this->setVarsFromFetchObj($obj); $this->setVarsFromFetchObj($obj);
@ -6318,13 +6317,6 @@ abstract class CommonObject
return -1; return -1;
} }
} }
else
{
$this->error = $this->db->lasterror();
$this->errors[] = $this->error;
return -1;
}
}
/** /**
* Update object into database * Update object into database