From f40f82f91e721be43f9b89213eca60a964a50b04 Mon Sep 17 00:00:00 2001 From: Torsten Dittmann Date: Tue, 20 Apr 2021 10:05:09 +0200 Subject: [PATCH] fix: save false value in database for filtering --- src/Appwrite/Database/Adapter/MySQL.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/Appwrite/Database/Adapter/MySQL.php b/src/Appwrite/Database/Adapter/MySQL.php index 8a7685429..37d07c3a2 100644 --- a/src/Appwrite/Database/Adapter/MySQL.php +++ b/src/Appwrite/Database/Adapter/MySQL.php @@ -283,6 +283,9 @@ class MySQL extends Adapter if (\is_array($prop['value'])) { throw new Exception('Value can\'t be an array: '.\json_encode($prop['value'])); } + if (\is_bool($prop['value'])) { + $prop['value'] = (int) $prop['value']; + } $st2->bindValue(':documentUid', $data['$id'], PDO::PARAM_STR); $st2->bindValue(':documentRevision', $revision, PDO::PARAM_STR);