FIX : cast int sql

This commit is contained in:
Gauthier PC portable 024 2022-03-10 12:02:25 +01:00
parent 732724ea51
commit b73e1019ed
2 changed files with 3 additions and 3 deletions

View File

@ -849,7 +849,7 @@ class StockTransfer extends CommonObject
$sql = 'SELECT rowid, date_creation as datec, tms as datem,';
$sql .= ' fk_user_creat, fk_user_modif';
$sql .= ' FROM '.MAIN_DB_PREFIX.$this->table_element.' as t';
$sql .= ' WHERE t.rowid = '.$id;
$sql .= ' WHERE t.rowid = '.((int) $id);
$result = $this->db->query($sql);
if ($result) {
if ($this->db->num_rows($result)) {

View File

@ -873,7 +873,7 @@ class StockTransferLine extends CommonObjectLine
$sql = 'SELECT rowid, date_creation as datec, tms as datem,';
$sql .= ' fk_user_creat, fk_user_modif';
$sql .= ' FROM '.MAIN_DB_PREFIX.$this->table_element.' as t';
$sql .= ' WHERE t.rowid = '.$id;
$sql .= ' WHERE t.rowid = '.((int) $id);
$result = $this->db->query($sql);
if ($result) {
if ($this->db->num_rows($result)) {
@ -929,7 +929,7 @@ class StockTransferLine extends CommonObjectLine
$this->lines = array();
$objectline = new StockTransferLineLine($this->db);
$result = $objectline->fetchAll('ASC', 'position', 0, 0, array('customsql'=>'fk_stocktransferline = '.$this->id));
$result = $objectline->fetchAll('ASC', 'position', 0, 0, array('customsql'=>'fk_stocktransferline = '.((int) $this->id)));
if (is_numeric($result)) {
$this->error = $this->error;