1
0
Fork 0
mirror of synced 2024-07-01 12:40:34 +12:00

Merge pull request #1097 from TorstenDittmann/fix-false-boolean-properties

fix: save false values in database for filtering
This commit is contained in:
Eldad A. Fux 2021-04-20 16:52:09 +03:00 committed by GitHub
commit b0cb7a9b8d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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);