Skip to content

Commit

Permalink
Fix first disabled module not recognized
Browse files Browse the repository at this point in the history
Fix issue, that first disabled module was not recognized as disabled
because array_search return then 0 which is equal false in php
  • Loading branch information
keywan-ghadami-oxid authored Mar 8, 2019
1 parent 2c52565 commit abff6c9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Core/ConfigImport.php
Original file line number Diff line number Diff line change
Expand Up @@ -332,14 +332,14 @@ protected function importConfigValues($aConfigValues)
$aModulePathsClean = $modulesKnownByPath;
foreach ($modulesKnownByPath as $sModuleId => $path) {
if (!isset($aModuleVersions[$sModuleId])) {
$isDisabled = array_search($sModuleId,$aDisabledModules);
if (!$oModule->load($sModuleId)) {
unset ($aModulePathsClean[$sModuleId]);
$this->output->writeLn(
"[WARN] {$sModuleId} it is not part of the import but, not installed physically, but somehow registered; removing it from modulePath array."
);
$oConfig->saveShopConfVar('aarr','aModulePaths',$aModulePathsClean);
}
$isDisabled = in_array($sModuleId, $aDisabledModules);
if (!$isDisabled) {
$this->output->writeLn(
"[WARN] disabling {$sModuleId} because it is not part of the import but installed on this system, please create a new export"
Expand Down

0 comments on commit abff6c9

Please sign in to comment.