1
0
mirror of https://git.tt-rss.org/git/tt-rss.git synced 2025-12-13 17:35:56 +00:00

format headlines list: normalize booleans for pdo mysql

This commit is contained in:
Andrew Dolgov
2018-12-08 08:23:18 +03:00
parent abaf597808
commit 41e967136f

View File

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