From 7873714f174fbae1fbeb5ce52136a20eba147151 Mon Sep 17 00:00:00 2001 From: MaxBUhe Date: Tue, 30 Jul 2024 15:55:52 +0200 Subject: [PATCH] [Fixed] missing class extension Activating the Module on CLI happens so early, there's no ModuleChain available yet, therefor no extension, therefor no additional methods --- Setup/Actions.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Setup/Actions.php b/Setup/Actions.php index 8d37da3..256b834 100644 --- a/Setup/Actions.php +++ b/Setup/Actions.php @@ -20,7 +20,7 @@ class Actions public function d3SaveDefaultSettings(string $sVarType, string $sSettingName, string $sSettingValue){ $oConfig = Registry::getConfig(); - if (trim($this->d3GetModuleConfigParam($sSettingName)) !== trim($sSettingValue)){ + if ($this->d3GetModuleConfigParam($sSettingName) and (trim($this->d3GetModuleConfigParam($sSettingName)) !== trim($sSettingValue))){ $sSettingValue = trim($this->d3GetModuleConfigParam($sSettingName)); } @@ -39,6 +39,6 @@ class Actions */ public function d3GetModuleConfigParam(string $configParamName) { - return Registry::get(ViewConfig::class)->d3GetModuleConfigParam($configParamName); + return Registry::getConfig()->getShopConfVar(Constants::OXID_MODULE_ID.$configParamName, null, Constants::OXID_MODULE_ID); } } \ No newline at end of file