Merge pull request #4051 from marcosgdf/bug-4018

FIX #4018 SQL error if trying to access the mailing/card.php page without an ID defined
This commit is contained in:
Laurent Destailleur 2015-11-21 17:46:26 +01:00
commit 295d83001a

View File

@ -196,7 +196,7 @@ class Mailing extends CommonObject
$sql.= ", m.date_envoi";
$sql.= ", m.extraparams";
$sql.= " FROM ".MAIN_DB_PREFIX."mailing as m";
$sql.= " WHERE m.rowid = ".$rowid;
$sql.= " WHERE m.rowid = ".(int) $rowid;
dol_syslog(get_class($this)."::fetch", LOG_DEBUG);
$result=$this->db->query($sql);