Fix: $result non défini
This commit is contained in:
parent
402cf66d0d
commit
aa10b55229
@ -1710,11 +1710,13 @@ class Propal extends CommonObject
|
|||||||
$sql.= " FROM ".MAIN_DB_PREFIX."propal as c";
|
$sql.= " FROM ".MAIN_DB_PREFIX."propal as c";
|
||||||
$sql.= " WHERE c.rowid = $id";
|
$sql.= " WHERE c.rowid = $id";
|
||||||
|
|
||||||
if ($this->db->query($sql))
|
$result = $this->db->query($sql);
|
||||||
{
|
|
||||||
if ($this->db->num_rows())
|
if ($result)
|
||||||
{
|
{
|
||||||
$obj = $this->db->fetch_object();
|
if ($this->db->num_rows($result))
|
||||||
|
{
|
||||||
|
$obj = $this->db->fetch_object($result);
|
||||||
|
|
||||||
$this->id = $obj->rowid;
|
$this->id = $obj->rowid;
|
||||||
|
|
||||||
@ -1727,22 +1729,22 @@ class Propal extends CommonObject
|
|||||||
$this->user_creation = $cuser;
|
$this->user_creation = $cuser;
|
||||||
|
|
||||||
if ($obj->fk_user_valid)
|
if ($obj->fk_user_valid)
|
||||||
{
|
{
|
||||||
$vuser = new User($this->db, $obj->fk_user_valid);
|
$vuser = new User($this->db, $obj->fk_user_valid);
|
||||||
$vuser->fetch();
|
$vuser->fetch();
|
||||||
$this->user_validation = $vuser;
|
$this->user_validation = $vuser;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($obj->fk_user_cloture)
|
if ($obj->fk_user_cloture)
|
||||||
{
|
{
|
||||||
$cluser = new User($this->db, $obj->fk_user_cloture);
|
$cluser = new User($this->db, $obj->fk_user_cloture);
|
||||||
$cluser->fetch();
|
$cluser->fetch();
|
||||||
$this->user_cloture = $cluser;
|
$this->user_cloture = $cluser;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
$this->db->free();
|
$this->db->free($result);
|
||||||
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user