Merge pull request #14010 from bafbes/abb110220

fix:bad database quotation for booleans
This commit is contained in:
Laurent Destailleur 2020-06-01 20:39:58 +02:00 committed by GitHub
commit 9bf69f11c4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -7556,6 +7556,10 @@ abstract class CommonObject
{
if (is_null($value)) return 'NULL';
elseif (preg_match('/^(int|double|real|price)/i', $fieldsentry['type'])) return $this->db->escape("$value");
elseif ($fieldsentry['type'] == 'boolean') {
if ($value) return 'true';
else return 'false';
}
else return "'".$this->db->escape($value)."'";
}