From 7b824298b79c70d4ce523f733307f8eab9aa2407 Mon Sep 17 00:00:00 2001 From: StrangeW Date: Sat, 7 Mar 2020 22:30:50 +0100 Subject: [PATCH] =?UTF-8?q?Correction=20du=20bug=20avec=20les=20booleen=20?= =?UTF-8?q?=C3=A0=20false=20et=20passant=200=20ou=201?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- mvc/Model.php | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/mvc/Model.php b/mvc/Model.php index 15404be..9bd8077 100755 --- a/mvc/Model.php +++ b/mvc/Model.php @@ -632,7 +632,15 @@ return false; } - $params[$nom] = $datas[$nom]; + //Gestion des booléan à false + if ($field['TYPE'] == "TINYINT"){ + if ($datas[$nom] == false) + $params[$nom] = 0; + else + $params[$nom] = 1; + }else{ + $params[$nom] = $datas[$nom]; + } $fieldNames[] = $nom; }