[BUGFIX] Use reflection information in getGettablePropertyNames
In \TYPO3\CMS\Extbase\Reflection\ObjectAccess there is a method to get all available property names of an object. Currently all get/is/has methods are joined as they can be fetch from Extbase as well. But for those methods it is necessary to respect their arguments as Extbase calls those functions without any argument. This can trigger PHP warnings. The patch uses a class reflection to get public properties and inspect the method arguments. Only those functions without arguments or only optional arguments are considered as valid property name. Resolves: #78270 Releases: master, 7.6 Change-Id: Ie286dca2a249b73d3dc58f7388dda593a678db3d Reviewed-on: https://review.typo3.org/50197 Tested-by:TYPO3com <no-reply@typo3.com> Reviewed-by:
Markus Klein <markus.klein@typo3.org> Tested-by:
Markus Klein <markus.klein@typo3.org> Reviewed-by:
Philipp Gampe <philipp.gampe@typo3.org> Tested-by:
Philipp Gampe <philipp.gampe@typo3.org>
Showing
- typo3/sysext/extbase/Classes/Reflection/ObjectAccess.php 29 additions, 13 deletionstypo3/sysext/extbase/Classes/Reflection/ObjectAccess.php
- typo3/sysext/extbase/Tests/Unit/Reflection/Fixture/DummyClassWithGettersAndSetters.php 10 additions, 0 deletions...it/Reflection/Fixture/DummyClassWithGettersAndSetters.php
- typo3/sysext/extbase/Tests/Unit/Reflection/ObjectAccessTest.php 14 additions, 2 deletions...sysext/extbase/Tests/Unit/Reflection/ObjectAccessTest.php
Please register or sign in to comment