Bug #89857
closedInsufficient case statement in Extbase DataMapper
100%
Description
The result of the switch statement in thawProperties
method of \TYPO3\CMS\Extbase\Persistence\Generic\Mapper\DataMapper
has an insufficient case statement (l. 306).
A domain object with a property $foo
is given and the @var
annotation is missing (which, of course, is a bug that has to be fixed by the extension developer) for that property. However, the resulting error title / message is:
#1288965219 InvalidArgumentException - $className must be a non empty string.
And this is very confusing.
Following variable and condition are given:
$propertyData['type'] = null;
is_subclass_of($propertyData['type'], \DateTimeInterface::class) --> evaluates to false.
As the switch function only checks for equal values and not for identically values the following condition is evaluated as true.
$propertyData['type'] == is_subclass_of($propertyData['type'], \DateTimeInterface::class)
Possible solutions:
There should be a check for null values prior to the switch function.
This glitch is still present in current dev-master.
Updated by Gerrit Code Review almost 5 years ago
- Status changed from New to Under Review
Patch set 1 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/62542
Updated by Gerrit Code Review almost 5 years ago
Patch set 2 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/62542
Updated by Gerrit Code Review almost 5 years ago
Patch set 3 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/62542
Updated by Gerrit Code Review almost 5 years ago
Patch set 4 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/62542
Updated by Gerrit Code Review almost 5 years ago
Patch set 5 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/62542
Updated by Gerrit Code Review almost 5 years ago
Patch set 6 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/62542
Updated by Gerrit Code Review almost 5 years ago
Patch set 7 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/62542
Updated by Gerrit Code Review over 4 years ago
Patch set 8 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/62542
Updated by Gerrit Code Review over 4 years ago
Patch set 9 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/62542
Updated by Gerrit Code Review over 4 years ago
Patch set 10 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/62542
Updated by Gerrit Code Review over 4 years ago
Patch set 11 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/62542
Updated by Susanne Moog over 4 years ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset 7ca1f49c9f9a3e0a9840ddd681c67ccd7c26c2b4.
Updated by Gerrit Code Review over 4 years ago
- Status changed from Resolved to Under Review
Patch set 1 for branch 9.5 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/63468
Updated by Gerrit Code Review over 4 years ago
Patch set 2 for branch 9.5 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/63468
Updated by Gerrit Code Review over 4 years ago
Patch set 3 for branch 9.5 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/63468
Updated by Susanne Moog over 4 years ago
- Status changed from Under Review to Resolved
Applied in changeset d13c8b3de4f69becbd3aeb4b46833baacb09286c.
Updated by Volker Diels-Grabsch over 4 years ago
- Related to Bug #90992: Fix programming error that only works for subtle reasons added
Updated by Georg Ringer over 4 years ago
- Related to Bug #90996: Exception message hard to read added