From e533572ca355075a9f153214048acdc7ed392cbd Mon Sep 17 00:00:00 2001
From: Michael <heluecht@pirati.ca>
Date: Wed, 23 Aug 2017 19:40:42 +0000
Subject: [PATCH] Issue 3645: Avoid problems with boolean values

---
 include/dba.php | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/include/dba.php b/include/dba.php
index 6bb18a0b74..675e40b055 100644
--- a/include/dba.php
+++ b/include/dba.php
@@ -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;
 		}
 
-- 
2.39.5