Project

General

Profile

Actions

Bug #89022

closed

TCA eval => 'date' sometimes fails with error

Added by Georg Tiefenbrunn about 5 years ago. Updated 4 months ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
DataHandler aka TCEmain
Target version:
-
Start date:
2019-08-27
Due date:
% Done:

100%

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

Description

Looking into the error log I stumbled upon the following error:

Core: Exception handler (WEB): Uncaught TYPO3 Exception: DateTime::__construct(): Failed to parse time string (1566777600) at position 8 (0): Unexpected character | Exception thrown in file .../typo3/sysext/core/Classes/DataHandling/DataHandler.php in line 1904.

I can't reproduce the error in BE :( The request indicates that the error occurs when saving new records.

// TCA definition
'config' => [
    'type' => 'input',
    'renderType' => 'inputDateTime',
    'dbType' => 'date',
    'eval' => 'date',
    'size' => 10,
    'default' => null,
]

TYPO3\CMS\Core\DataHandling\DataHandler::checkValueForInput()

9.5 https://github.com/TYPO3/TYPO3.CMS/blob/9.5/typo3/sysext/core/Classes/DataHandling/DataHandler.php#L1904
10 https://github.com/TYPO3/TYPO3.CMS/blob/master/typo3/sysext/core/Classes/DataHandling/DataHandler.php#L1738

$dateTime = new \DateTime($value);

Under conditions I can't reproduce $value passed to \DateTime() is an integer (see error above: 1566777600 = 2019-08-26T00:00:00+00:00).


Related issues 1 (0 open1 closed)

Related to TYPO3 Core - Bug #101278: Fix incorrect DateTimeTest method namesClosedBenjamin Franzke2023-07-06

Actions
Actions #1

Updated by Gerrit Code Review over 1 year ago

  • Status changed from New to Under Review

Patch set 1 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/79800

Actions #2

Updated by Gerrit Code Review over 1 year ago

Patch set 2 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/79800

Actions #3

Updated by Gerrit Code Review over 1 year ago

Patch set 3 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/79800

Actions #4

Updated by Gerrit Code Review over 1 year ago

Patch set 4 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/79800

Actions #5

Updated by Gerrit Code Review over 1 year ago

Patch set 5 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/79800

Actions #6

Updated by Gerrit Code Review over 1 year ago

Patch set 1 for branch 12.4 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/79855

Actions #7

Updated by Benni Mack over 1 year ago

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

Updated by Benjamin Franzke over 1 year ago

  • Related to Bug #101278: Fix incorrect DateTimeTest method names added
Actions #9

Updated by Gerrit Code Review over 1 year ago

  • Status changed from Resolved to Under Review

Patch set 2 for branch 12.4 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/79855

Actions #10

Updated by Garvin Hicking 4 months ago

  • Status changed from Under Review to Closed

Stale "under review", closing due to original changeset applied

Actions

Also available in: Atom PDF