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), ]; } }