]> git.mxchange.org Git - friendica.git/commitdiff
Issue 3645: Avoid problems with boolean values
authorMichael <heluecht@pirati.ca>
Wed, 23 Aug 2017 19:40:42 +0000 (19:40 +0000)
committerMichael <heluecht@pirati.ca>
Wed, 23 Aug 2017 19:40:42 +0000 (19:40 +0000)
include/dba.php

index 6bb18a0b744c5d63d12ed7f72c7f1d5741d57cf7..675e40b055f156f3a939cc5db5bf870f252b9d2e 100644 (file)
@@ -527,6 +527,10 @@ class dba {
                $i = 0;
                $args = array();
                foreach ($params AS $param) {
+                       // Avoid problems with some MySQL servers and boolean values. See issue #3645
+                       if (is_bool($param)) {
+                               $param = (int)$param;
+                       }
                        $args[++$i] = $param;
                }