Project

General

Profile

Actions

Bug #102278

closed

Missing default value for property Container.php:$prototypeObjectsWhichAreCurrentlyInstanciated will lead to #1546632293 RuntimeException in GenericObjectValidator.php

Added by Tobi Ferger 7 months ago. Updated about 1 month ago.

Status:
Resolved
Priority:
Should have
Assignee:
-
Category:
Extbase
Target version:
-
Start date:
2023-10-27
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
11
PHP Version:
7.4
Tags:
Complexity:
Is Regression:
Sprint Focus:

Description

In the class TYPO3\CMS\Extbase\Object\Container\Container.php the declaration of property $prototypeObjectsWhichAreCurrentlyInstanciated lacks of default value "empty array".
This leads to #1546632293 RuntimeException in Extbase/Validation/Validator/GenericObjectValidator.php:72 when e.g. reflection service try to access an uninitialized property like you have in models with an objectstorage property instanciated via constructor when they are defined as nullable.

change TYPO3\CMS\Extbase\Object\Container\Container.php:75:
private $prototypeObjectsWhichAreCurrentlyInstanciated;
to
private $prototypeObjectsWhichAreCurrentlyInstanciated = [];
to fix.


Related issues 3 (0 open3 closed)

Related to TYPO3 Core - Bug #95819: Extbase does not support uninitialized domain object propertiesClosedAlexander Schnitzler2021-10-30

Actions
Related to TYPO3 Core - Bug #97646: Extbase property mapper does not work with uninitialized propertiesClosedSascha Egerer2022-05-17

Actions
Related to TYPO3 Core - Task #95326: Do not use custom "getInstance()" methods on Singleton interfacesClosedBenni Mack2021-09-23

Actions
Actions

Also available in: Atom PDF