Merge pull request #15130 from bafbes/abb120351

fix:rowid is string in currencies table
This commit is contained in:
Laurent Destailleur 2020-10-25 14:45:12 +01:00 committed by GitHub
commit 21d26c008a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -878,7 +878,11 @@ if (GETPOST('actionadd') || GETPOST('actionmodify'))
$i++;
}
$sql .= " WHERE ".$rowidcol." = ".(int) $db->escape($rowid);
if (in_array($rowidcol, array('code', 'code_iso'))) {
$sql .= " WHERE ".$rowidcol." = '".$db->escape($rowid)."'";
} else {
$sql .= " WHERE ".$rowidcol." = ".((int) $rowid);
}
if (in_array('entity', $listfieldmodify)) $sql .= " AND entity = '".getEntity($tabname[$id])."'";
dol_syslog("actionmodify", LOG_DEBUG);