diff --git a/app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Admin/Observer.php b/app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Admin/Observer.php index 3686a208d25..39d40d0be7c 100644 --- a/app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Admin/Observer.php +++ b/app/code/core/Mage/Adminhtml/Model/System/Config/Backend/Admin/Observer.php @@ -58,8 +58,7 @@ public function beforeRenderModuleList(Varien_Event_Observer $observer): void $data = $modules->getData(); /** @var Mage_Core_Model_Config_Element $module */ foreach ($data as $index => $module) { - $module = $module->asArray(); - if ($module['active'] === 'false') { + if ($module->active === 'false') { unset($data[$index]); } } diff --git a/tests/unit/Mage/Adminhtml/Block/System/Config/Form/Fieldset/Modules/DisableOutputTest.php b/tests/unit/Mage/Adminhtml/Block/System/Config/Form/Fieldset/Modules/DisableOutputTest.php index 230fa611c1b..05cf7aa8bc6 100644 --- a/tests/unit/Mage/Adminhtml/Block/System/Config/Form/Fieldset/Modules/DisableOutputTest.php +++ b/tests/unit/Mage/Adminhtml/Block/System/Config/Form/Fieldset/Modules/DisableOutputTest.php @@ -39,7 +39,7 @@ public function setUp(): void */ public function testGetModulesCount(): void { - $this->assertSame(61, count($this->subject->getModules())); + $this->assertSame(60, count($this->subject->getModules())); } /**