From 3116de4e9b25c546b884f049e93e28365d116b85 Mon Sep 17 00:00:00 2001 From: Joedmin Date: Sat, 23 Nov 2024 14:12:26 +0100 Subject: [PATCH] fix: spamming logs with 'wallabag_keyboard_shortcut' not set Closes #7 --- Controllers/wallabagButtonController.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Controllers/wallabagButtonController.php b/Controllers/wallabagButtonController.php index dbd7a87..fe04e48 100644 --- a/Controllers/wallabagButtonController.php +++ b/Controllers/wallabagButtonController.php @@ -10,7 +10,9 @@ public function jsVarsAction(): void $extension = Minz_ExtensionManager::findExtension('Wallabag Button'); $this->view->wallabag_button_vars = json_encode(array( 'instance_url' => FreshRSS_Context::userConf()->attributeString('wallabag_instance_url'), - 'keyboard_shortcut' => FreshRSS_Context::userConf()->attributeString('wallabag_keyboard_shortcut'), + 'keyboard_shortcut' => FreshRSS_Context::userConf()->hasParam("wallabag_keyboard_shortcut") ? + FreshRSS_Context::userConf()->attributeString('wallabag_keyboard_shortcut') + : '', 'icons' => array( 'added_to_wallabag' => $extension->getFileUrl('added_to_wallabag.svg', 'svg'), ),