[BUGFIX] Avoid invalid property access when persisting extbase objects
With #95819 the detection of Domain Object properties was changed to use ClassSchema in order to support uninitialized properties is models. This was not possible with `DomainObjectInterface::_getProperties()` which used `get_object_vars()` under the hood. However, with mentioned change, other properties which had been ignored by `get_object_vars()` were now propagated to persistence, even if those properties were not configured in TCA. The change in behavior is considered a regression and is now addressed: The retrieval of the property value is delayed until after it is ensured that the property is a persistable property (which asserts that we are not reading from private properties). Resolves: #98148 Related: #95819 Releases: main, 11.5 Change-Id: I94d41715a49953045d32361a00bc274c15112a1e Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/75534 Reviewed-by:Benjamin Franzke <bfr@qbus.de> Reviewed-by:
theline <typo3@root-access.de> Reviewed-by:
Alexander Schnitzler <git@alexanderschnitzler.de> Reviewed-by:
Oliver Hader <oliver.hader@typo3.org> Reviewed-by:
Stefan Bürk <stefan@buerk.tech> Tested-by:
Benjamin Franzke <bfr@qbus.de> Tested-by:
core-ci <typo3@b13.com> Tested-by:
theline <typo3@root-access.de> Tested-by:
Alexander Schnitzler <git@alexanderschnitzler.de> Tested-by:
Oliver Hader <oliver.hader@typo3.org> Tested-by:
Stefan Bürk <stefan@buerk.tech>
Showing
- typo3/sysext/extbase/Classes/Persistence/Generic/Backend.php 9 additions, 3 deletionstypo3/sysext/extbase/Classes/Persistence/Generic/Backend.php
- typo3/sysext/extbase/Classes/Persistence/Generic/Storage/Typo3DbBackend.php 1 addition, 2 deletions...se/Classes/Persistence/Generic/Storage/Typo3DbBackend.php
- typo3/sysext/extbase/Tests/Functional/Fixtures/Extensions/blog_example/Classes/Domain/Model/DateTimeImmutableExample.php 18 additions, 0 deletions...example/Classes/Domain/Model/DateTimeImmutableExample.php
Please register or sign in to comment