summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSchrottfresse <[email protected]>2022-01-28 08:37:29 +0100
committerSchrottfresse <[email protected]>2022-01-28 08:37:29 +0100
commit931e33c3818d160a2ea4e7e30c220df0b622cca7 (patch)
treed6586ee4beb602efcaabb0f2215b8b91ae54f3fd
parent478c9b64a94261e9b7e68de571bf85144636509e (diff)
Add workaround for boolean values being intergers with MySQL/PHP 8.1
-rwxr-xr-xclasses/feeds.php6
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";
+ }
}
}