From 2984edc752de5b9f719228ee941d8d9f903dc675 Mon Sep 17 00:00:00 2001 From: bahfir abbes Date: Tue, 12 May 2020 15:39:17 +0100 Subject: [PATCH] fix:bad database quotation for booleans --- htdocs/core/class/commonobject.class.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/htdocs/core/class/commonobject.class.php b/htdocs/core/class/commonobject.class.php index fd5e70c3669..8bec3f79099 100644 --- a/htdocs/core/class/commonobject.class.php +++ b/htdocs/core/class/commonobject.class.php @@ -7915,6 +7915,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)."'"; }