Bug #47809

Access to undefined index when an inheritance chain member is not an Entity

Added by Adrian Föder over 8 years ago. Updated over 7 years ago.

Status:
Resolved
Priority:
Should have
Assignee:
Category:
Reflection
Start date:
2013-05-02
Due date:
% Done:

100%

Estimated time:
PHP Version:
Has patch:
No
Complexity:

Description

It comes to an exception like this,

#1355480641: Uncaught Exception Notice: Undefined index: TYPO3\Media\Domain\Model\ImageVariant in Packages\Framework\TYPO3.Flow\Classes\TYPO3\Flow\Reflection\ReflectionService.php line 1461

This is because of these lines,

    protected function makeChildClassesAggregateRoot(\TYPO3\Flow\Reflection\ClassSchema $classSchema) {
        foreach ($this->getAllSubClassNamesForClass($classSchema->getClassName()) as $childClassName) {
            if ($this->classSchemata[$childClassName]->isAggregateRoot()) {
                continue;

In the given case, the ImageVariant inheritance looks like the following:

Asset (@Entity)
  - SizedAsset (@Entity)
    - ImageVariant (NOT an @Entity!)

The above mentioned method searches in ->classSchemata for the ImageVariant, but as of convention, classSchemata is "Schemata of all classes which can be persisted", so ImageVariant is not there of course, leading to the exception.

#1

Updated by Adrian Föder over 8 years ago

  • Status changed from New to Accepted
#2

Updated by Gerrit Code Review over 8 years ago

  • Status changed from Accepted to Under Review

Patch set 2 for branch master has been pushed to the review server.
It is available at https://review.typo3.org/20402

#3

Updated by Robert Lemke over 8 years ago

  • Priority changed from Must have to Should have
  • Target version set to 2.0
#4

Updated by Karsten Dambekalns about 8 years ago

  • Target version changed from 2.0 to 2.0.1
#5

Updated by Gerrit Code Review about 8 years ago

Patch set 1 for branch 2.0 has been pushed to the review server.
It is available at https://review.typo3.org/24033

#6

Updated by Adrian Föder over 7 years ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100

Also available in: Atom PDF