From 41e967136f6391ff6d7a7c20af47dc434d853099 Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Sat, 8 Dec 2018 08:23:18 +0300 Subject: [PATCH] format headlines list: normalize booleans for pdo mysql --- classes/feeds.php | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/classes/feeds.php b/classes/feeds.php index 1c4f5fc14..a5810cdaa 100755 --- a/classes/feeds.php +++ b/classes/feeds.php @@ -242,6 +242,13 @@ class Feeds extends Handler_Protected { $id = $line["id"]; + // frontend doesn't expect pdo returning booleans as strings on mysql + if (DB_TYPE == "mysql") { + foreach (["unread", "marked", "published"] as $k) { + $line[$k] = $line[$k] === "1"; + } + } + // normalize archived feed if ($line['feed_id'] === null) { $line['feed_id'] = 0;