View Issue Details

IDProjectCategoryView StatusLast Update
0005534OXID eShop (all versions)4.07. Source code, Testpublic2014-02-21 07:58
ReporterFibreFoX Assigned To 
PrioritylowSeveritytweakReproducibilityalways
Status resolvedResolutionfixed 
Product Version4.8.0 / 5.1.0 
Fixed in Version4.9.0_5.2.0_beta1 
Summary0005534: replace array-key-check from isset to array_key_exists (oxutilsobject)
Descriptionfound in oxutilsobject.php while debugging a module:

method _getActiveModuleChain has following check:
                $sPath = $aModulePaths[$sId];
                if (!isset($sPath)) {
                    $sPath = $sId;
                }

i get errors when having this set:
ini_set('error_reporting', E_ALL | E_NOTICE);
Additional InformationSuggestion to replace with:


$sPath = $sId; // always have fallback
if(array_key_exists($sId, $aModulePaths)){
    $sPath = $aModulePaths[$sId];
    if(empty($sPath)){
        $sPath = $sId; // second fallback (data may be corrupted)
    }
}
TagsNo tags attached.
ThemeBoth
BrowserAll
PHP Versionany
Database Versionany

Activities

svetlana

2013-12-02 14:19

reporter   ~0009325

Reminder sent to: FibreFoX

Thank you very much for your bug report. As we saw, you already submitted a complete solution for this issue. If you feel fancy, you'd also have the possibility to contribute your changes directly to our GitHub repository on https://github.com/OXID-eSales/oxideshop_ce/. Please leave a note there with the bug number you fixed so we can close this issue in the bug tracker.

tadas

2014-02-21 07:57

reporter   ~0009563

Added array key exists check as suggested to avoid unnecessary notices.