View Issue Details

IDProjectCategoryView StatusLast Update
0004002OXID eShop (all versions)2. ----- eShop backend (admin) -----public2012-05-18 10:45
ReporterWBL_BjoernLange Assigned To 
PriorityhighSeveritytweakReproducibilityalways
Status resolvedResolutionfixed 
Product Version4.6.0 revision 44406 
Fixed in Version4.6.1 revision 45706 
Summary0004002: Redundancy in oxModule::deactivate
DescriptionoxModule::deactivate works with numeric Arrays to merge the freshly deactivated Module-ID with "aDisabledModules" and lets the array grow infinitely

"Values in the input array with numeric keys will be renumbered with incrementing keys starting from zero in the result array." http://php.net/array_merge

There is a missing in_array or array_unique call in

if (isset($sModuleId)) {
            $aDisabledModules = $this->getDisabledModules();

            if (!is_array($aDisabledModules)) {
                $aDisabledModules = array();
            }
            $aModules = array_merge($aDisabledModules, array($sModuleId));

            $this->getConfig()->saveShopConfVar('arr', 'aDisabledModules', $aModules);
            $this->getConfig()->setConfigParam('aDisabledModules', $aModules);
TagsNo tags attached.
ThemeBoth
BrowserAll
PHP Versionany
Database Versionany

Activities

vaidas.matulevicius

2012-05-18 10:44

reporter   ~0006631

We added additional array_unique function in oxModule::deactivate for keeping unique items in aDisabledModules array.