From 92ec8e683fe7de432609886e65943942133146c2 Mon Sep 17 00:00:00 2001 From: dartcafe Date: Fri, 22 Dec 2023 08:25:40 +0100 Subject: [PATCH] avoid error logging #3216 Signed-off-by: dartcafe --- lib/Db/Preferences.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/Db/Preferences.php b/lib/Db/Preferences.php index a6cec77a5..215439e5b 100644 --- a/lib/Db/Preferences.php +++ b/lib/Db/Preferences.php @@ -68,7 +68,7 @@ public function __construct() { } public function getPreferences_decoded(): mixed { - return json_decode($this->getPreferences()); + return json_decode((string) $this->getPreferences()); } /** @@ -107,7 +107,7 @@ public function getCheckCalendarsAfter(): int { */ public function jsonSerialize(): array { return [ - 'preferences' => json_decode($this->preferences ?? ''), + 'preferences' => json_decode((string) $this->preferences), ]; } }