View Issue Details

IDProjectCategoryView StatusLast Update
0007919OXID eShop (all versions)4.07. Source code, Testpublic2026-04-01 14:37
ReporterNilsBaczynski Assigned To 
PrioritynormalSeverityminorReproducibilityalways
Status newResolutionopen 
Product Version6.5.3 
Summary0007919: vendor/oxid-esales/oxideshop-ce/source/Application/Model/Article.php::getCategory() throws error
DescriptionDue 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 ReproduceEither 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();
        }
```
TagsNo tags attached.
ThemeAll
BrowserAll
PHP VersionNot defined
Database VersionNot defined

Activities

There are no notes attached to this issue.