Merge pull request #5131 from frederic34/patch-10

If no project, update line is impossible
This commit is contained in:
Laurent Destailleur 2016-04-29 17:06:39 +02:00
commit 9a53e5edff

View File

@ -1265,7 +1265,9 @@ class ExpenseReport extends CommonObject
$sql.= " FROM ".MAIN_DB_PREFIX."projet as p";
$sql.= " WHERE p.rowid = ".$projet_id;
$result = $this->db->query($sql);
$objp_projet = $this->db->fetch_object($result);
if ($result) {
$objp_projet = $this->db->fetch_object($result);
}
$ligne->projet_ref = $objp_projet->ref_projet;
$ligne->projet_title = $objp_projet->title_projet;