Fix fetchCommon should return 0 iso error if not found
This commit is contained in:
parent
d6ed968c51
commit
00185bd9d4
@ -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
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user