View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0005534 | OXID eShop (all versions) | 4.07. Source code, Test | public | 2013-11-28 11:51 | 2014-02-21 07:58 |
Reporter | FibreFoX | Assigned To | |||
Priority | low | Severity | tweak | Reproducibility | always |
Status | resolved | Resolution | fixed | ||
Product Version | 4.8.0 / 5.1.0 | ||||
Fixed in Version | 4.9.0_5.2.0_beta1 | ||||
Summary | 0005534: replace array-key-check from isset to array_key_exists (oxutilsobject) | ||||
Description | found 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 Information | Suggestion 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) } } | ||||
Tags | No tags attached. | ||||
Theme | Both | ||||
Browser | All | ||||
PHP Version | any | ||||
Database Version | any | ||||
|
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. |
|
Added array key exists check as suggested to avoid unnecessary notices. |