From 931e33c3818d160a2ea4e7e30c220df0b622cca7 Mon Sep 17 00:00:00 2001 From: Schrottfresse Date: Fri, 28 Jan 2022 08:37:29 +0100 Subject: [PATCH] Add workaround for boolean values being intergers with MySQL/PHP 8.1 --- classes/feeds.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/classes/feeds.php b/classes/feeds.php index 2c37d659a..cc78b498c 100755 --- a/classes/feeds.php +++ b/classes/feeds.php @@ -195,7 +195,11 @@ class Feeds extends Handler_Protected { // frontend doesn't expect pdo returning booleans as strings on mysql if (Config::get(Config::DB_TYPE) == "mysql") { foreach (["unread", "marked", "published"] as $k) { - $line[$k] = $line[$k] === "1"; + if (is_integer($line[$k])) { + $line[$k] = $line[$k] === 1; + } else { + $line[$k] = $line[$k] === "1"; + } } }