Merge pull request #4286 from marcosgdf/bug-4055
FIX #4055 SQL error when trying to access a non-existing expedition
This commit is contained in:
commit
c9e8c362a5
@ -841,7 +841,7 @@ class ActionComm extends CommonObject
|
||||
if (! empty($elementtype))
|
||||
{
|
||||
if ($elementtype == 'project') $sql.= ' AND a.fk_project = '.$fk_element;
|
||||
else $sql.= " AND a.fk_element = ".$fk_element." AND a.elementtype = '".$elementtype."'";
|
||||
else $sql.= " AND a.fk_element = ".(int) $fk_element." AND a.elementtype = '".$elementtype."'";
|
||||
}
|
||||
if (! empty($filter)) $sql.= $filter;
|
||||
if ($sortorder && $sortfield) $sql.=$db->order($sortfield, $sortorder);
|
||||
|
||||
@ -536,7 +536,7 @@ class Expedition extends CommonObject
|
||||
else
|
||||
{
|
||||
dol_syslog(get_class($this).'::Fetch no expedition found', LOG_ERR);
|
||||
$this->error='Delivery with id '.$id.' not found sql='.$sql;
|
||||
$this->error='Delivery with id '.$id.' not found';
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user