View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0007610 | OXID eShop (all versions) | 4.05. Performance | public | 2024-03-04 14:56 | 2024-03-20 15:16 |
Reporter | mf | Assigned To | |||
Priority | normal | Severity | minor | Reproducibility | always |
Status | confirmed | Resolution | open | ||
Product Version | 7.0.2 | ||||
Summary | 0007610: Missing initialization of variable in _loadFromCache method | ||||
Description | In the method \OxidEsales\EshopEnterprise\Application\Model\Article::_loadFromCache, in some cases the variable $data is not initialized before it is accessed for the first time. protected function loadFromCache($articleId) { $genericCache = $this->getCacheBackend(); $cacheKey = $this->getCacheKey($articleId); $cacheItem = $genericCache->get($cacheKey); if ($cacheItem) { $data = $cacheItem->getData(); } if (!$data) { $data = $this->loadFromDb($articleId); $cacheItem = oxNew(CacheItem::class); $cacheItem->setData($data); $genericCache->set($cacheKey, $cacheItem); } return $data; } This is also the case in OXID 6.5. | ||||
Tags | No tags attached. | ||||
Theme | Not defined | ||||
Browser | Not defined | ||||
PHP Version | Not defined | ||||
Database Version | Not defined | ||||