From f82d321f88cb6b521f0a90816e3b022042acf3fc Mon Sep 17 00:00:00 2001 From: Lucas Bartholemy Date: Fri, 14 Jul 2023 15:28:30 +0200 Subject: [PATCH] Release Beta 5 --- Events.php | 6 +++--- docs/CHANGELOG.md | 7 +++++++ module.json | 2 +- services/DriverService.php | 4 ++++ 4 files changed, 15 insertions(+), 4 deletions(-) diff --git a/Events.php b/Events.php index 7de659b..07c851e 100644 --- a/Events.php +++ b/Events.php @@ -38,7 +38,7 @@ public static function onManifestControllerInit($event) $controller->manifest['gcm_sender_id'] = (string)103953800507; } - public static function onServiceWorkerControllerInit($event) + public static function onServiceWorkerControllerInit($event): void { /** @var ServiceWorkerController $controller */ $controller = $event->sender; @@ -46,7 +46,7 @@ public static function onServiceWorkerControllerInit($event) /** @var Module $module */ $module = Yii::$app->getModule('fcm-push'); - if (!$module->getDriverService()->hasConfiguredDriver()) { + if (!$module->getDriverService()->hasConfiguredWebDriver()) { return; } @@ -105,7 +105,7 @@ public static function onLayoutAddonInit($event) /** @var Module $module */ $module = Yii::$app->getModule('fcm-push'); - if (!$module->getDriverService()->hasConfiguredDriver()) { + if (!$module->getDriverService()->hasConfiguredWebDriver()) { return; } diff --git a/docs/CHANGELOG.md b/docs/CHANGELOG.md index 9796f0d..c791634 100644 --- a/docs/CHANGELOG.md +++ b/docs/CHANGELOG.md @@ -1,3 +1,10 @@ +2.0.0-beta.5 (July 14, 2023) +---------------------------- + +- Fix: Error when no Web Driver is configured. + + + 2.0.0-beta.4 (July 13, 2023) ---------------------------- diff --git a/module.json b/module.json index 85d9e65..9b90cbe 100644 --- a/module.json +++ b/module.json @@ -11,6 +11,6 @@ "humhub": { "minVersion": "1.13" }, - "version": "2.0.0-beta.4", + "version": "2.0.0-beta.5", "screenshots": [] } diff --git a/services/DriverService.php b/services/DriverService.php index 3ed904c..802fec6 100644 --- a/services/DriverService.php +++ b/services/DriverService.php @@ -75,6 +75,10 @@ public function getMobileAppDriver(): ?DriverInterface return $this->getConfiguredDriverByType(Proxy::class); } + public function hasConfiguredWebDriver(): bool + { + return ($this->getWebDriver() !== null); + } public function hasConfiguredDriver(): bool {