diff options
author | Schrottfresse <[email protected]> | 2022-01-28 08:37:29 +0100 |
---|---|---|
committer | Schrottfresse <[email protected]> | 2022-01-28 08:37:29 +0100 |
commit | 931e33c3818d160a2ea4e7e30c220df0b622cca7 (patch) | |
tree | d6586ee4beb602efcaabb0f2215b8b91ae54f3fd /classes/feeds.php | |
parent | 478c9b64a94261e9b7e68de571bf85144636509e (diff) |
Add workaround for boolean values being intergers with MySQL/PHP 8.1
Diffstat (limited to 'classes/feeds.php')
-rwxr-xr-x | classes/feeds.php | 6 |
1 files changed, 5 insertions, 1 deletions
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"; + } } } |