From 6faf997829ec5eb56a9a3f97ba4499dc9f9a26aa Mon Sep 17 00:00:00 2001 From: Ferdinand Thiessen Date: Wed, 13 Dec 2023 02:04:39 +0100 Subject: [PATCH] fix: Allow older app values to be set Previously the app value `relativedates` were already used but set to an empty string in case of `false`. This needs to be handled correctly for users updating from 27 to 28. Signed-off-by: Ferdinand Thiessen --- lib/Service/SettingsService.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/Service/SettingsService.php b/lib/Service/SettingsService.php index 813cc1e4..fe3243f8 100644 --- a/lib/Service/SettingsService.php +++ b/lib/Service/SettingsService.php @@ -49,7 +49,7 @@ public function getDateTimeFormat(): string { * Load app config if dates should be displayed as relative dates */ public function getRelativeDates(): bool { - return json_decode($this->config->getAppValue('logreader', Constants::CONFIG_KEY_RELATIVEDATES, 'false'), flags: JSON_THROW_ON_ERROR); + return json_decode($this->config->getAppValue('logreader', Constants::CONFIG_KEY_RELATIVEDATES, 'false') ?: 'false', flags: JSON_THROW_ON_ERROR); } /**