mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-02-20 13:46:52 +01:00
FIX sanitize must allow space on attribute (#30566)
sanitize must allow space on attribute otherwhise "on update CURRENT_TIMESTAMP" for tms fields goes wrong
This commit is contained in:
parent
1c0e738617
commit
1a3dddb3cc
|
|
@ -853,7 +853,7 @@ class DoliDBMysqli extends DoliDB
|
|||
$sqlfields[$i] .= "(".$this->sanitize($field_desc['value']).")";
|
||||
}
|
||||
if (isset($field_desc['attribute']) && $field_desc['attribute'] !== '') {
|
||||
$sqlfields[$i] .= " ".$this->sanitize($field_desc['attribute']);
|
||||
$sqlfields[$i] .= " ".$this->sanitize($field_desc['attribute'], 0, 0, 1); // Allow space to accept attributes like "ON UPDATE CURRENT_TIMESTAMP"
|
||||
}
|
||||
if (isset($field_desc['default']) && $field_desc['default'] !== '') {
|
||||
if (in_array($field_desc['type'], array('tinyint', 'smallint', 'int', 'double'))) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user