View Issue Details
| ID | Project | Category | View Status | Date Submitted | Last Update |
|---|---|---|---|---|---|
| 0007919 | OXID eShop (all versions) | 4.07. Source code, Test | public | 2026-04-01 14:37 | 2026-04-01 14:37 |
| Reporter | NilsBaczynski | Assigned To | |||
| Priority | normal | Severity | minor | Reproducibility | always |
| Status | new | Resolution | open | ||
| Product Version | 6.5.3 | ||||
| Summary | 0007919: vendor/oxid-esales/oxideshop-ce/source/Application/Model/Article.php::getCategory() throws error | ||||
| Description | Due to improper usage of a static property in vendor/oxid-esales/oxideshop-ce/source/Application/Model/Article.php::getCategory, the shop throws an error. This error is suppressed in a live environment but it causes Unit Tests to fail: `Undefined property: Article::$_aCategoryCache` The exception is thrown in this line: `if (!isset($this->_aCategoryCache[$sOXID])) {` The property _aCategoryCache is static and should be called using self::_aCategoryCache just how OXID 7.x is already doing. | ||||
| Steps To Reproduce | Either run a test or run this anywhere with a loaded article: ``` set_error_handler(static function (int $severity, string $message, string $file, int $line): bool { throw new \ErrorException($message, 0, $severity, $file, $line); }); try { var_dump($article->getCategory()); } catch (\Throwable $e) { var_dump([ 'type' => get_class($e), 'message' => $e->getMessage(), 'file' => $e->getFile(), 'line' => $e->getLine(), ]); } finally { restore_error_handler(); } ``` | ||||
| Tags | No tags attached. | ||||
| Theme | All | ||||
| Browser | All | ||||
| PHP Version | Not defined | ||||
| Database Version | Not defined | ||||