2
0
forked from Wavyzz/dolibarr

Clean code by adding cast int.

This commit is contained in:
Laurent Destailleur
2021-08-27 16:33:03 +02:00
parent a6ed743af3
commit 2f225ee7e5
62 changed files with 198 additions and 194 deletions

View File

@@ -2782,7 +2782,7 @@ abstract class CommonObject
$sql = "UPDATE ".MAIN_DB_PREFIX.$this->table_element;
$sql .= " SET model_pdf = '".$this->db->escape($newmodelpdf)."'";
$sql .= " WHERE rowid = ".$this->id;
$sql .= " WHERE rowid = ".((int) $this->id);
dol_syslog(get_class($this)."::setDocModel", LOG_DEBUG);
$resql = $this->db->query($sql);
@@ -4500,7 +4500,7 @@ abstract class CommonObject
$sql = "UPDATE ".MAIN_DB_PREFIX.$this->table_element;
$sql .= " SET extraparams = ".(!empty($extraparams) ? "'".$this->db->escape($extraparams)."'" : "null");
$sql .= " WHERE rowid = ".$this->id;
$sql .= " WHERE rowid = ".((int) $this->id);
dol_syslog(get_class($this)."::setExtraParameters", LOG_DEBUG);
$resql = $this->db->query($sql);
@@ -9223,7 +9223,7 @@ abstract class CommonObject
$sql = "UPDATE ".MAIN_DB_PREFIX.$this->table_element;
$sql .= " SET ".$statusfield." = ".((int) $status);
$sql .= " WHERE rowid = ".$this->id;
$sql .= " WHERE rowid = ".((int) $this->id);
if ($this->db->query($sql)) {
if (!$error) {