Project

General

Profile

Actions

Bug #89857

closed

Insufficient case statement in Extbase DataMapper

Added by Florian Wessels almost 5 years ago. Updated over 4 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
Extbase
Target version:
-
Start date:
2019-12-05
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
9
PHP Version:
7.2
Tags:
Complexity:
Is Regression:
Sprint Focus:

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.


Related issues 2 (0 open2 closed)

Related to TYPO3 Core - Bug #90992: Fix programming error that only works for subtle reasonsClosed2020-04-09

Actions
Related to TYPO3 Core - Bug #90996: Exception message hard to readClosedGeorg Ringer2020-04-10

Actions
Actions #1

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

Actions #2

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

Actions #3

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

Actions #4

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

Actions #5

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

Actions #6

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

Actions #7

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

Actions #8

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

Actions #9

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

Actions #10

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

Actions #11

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

Actions #12

Updated by Susanne Moog over 4 years ago

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

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

Actions #14

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

Actions #15

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

Actions #16

Updated by Susanne Moog over 4 years ago

  • Status changed from Under Review to Resolved
Actions #17

Updated by Benni Mack over 4 years ago

  • Status changed from Resolved to Closed
Actions #18

Updated by Volker Diels-Grabsch over 4 years ago

  • Related to Bug #90992: Fix programming error that only works for subtle reasons added
Actions #19

Updated by Georg Ringer over 4 years ago

  • Related to Bug #90996: Exception message hard to read added
Actions

Also available in: Atom PDF