FIX #4018 SQL error if trying to access the mailing/card.php page without an ID defined

This commit is contained in:
Marcos García de La Fuente 2015-11-21 10:55:23 +01:00
parent 30f0b6e2e8
commit e31a8f25a2

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);