Bug #10341
DateTime properties cannot be persisted
Status: | Resolved | Start date: | 2010-10-19 | |
---|---|---|---|---|
Priority: | Should have | Due date: | ||
Assigned To: | Robert Lemke | % Done: | 100% |
|
Category: | Object | |||
Target version: | TYPO3 Flow Base Distribution - 1.0 alpha 13 | |||
PHP Version: | Complexity: | |||
Has patch: | Affected Flow version: |
Description
Using the Blog application with FLOW3 1.0.0 alpha 12 results in an exception when trying to create a new blog post:
#1265367590: Object "DateTime" is not registered. (More information) F3\FLOW3\Object\Exception\UnknownObjectException thrown in file Packages/Framework/FLOW3/Classes/Object/Container/AbstractObjectContainer.php in line 267.
The reason for this is that the validation framework tries to figure out if DateTime has the scope prototype (because it wouldn't create a validator for it otherwise). However, DateTime is not a registered object at the Object Manager. The check for prototype was introduced while solving #9862.
The solution is to pre-register (certain) built-in PHP classes, such as DateTime. I'm not sure at this point for which other classes it would make sense, therefore this is just about fixing the DateTime behavior.
Associated revisions
[+BUGFIX] FLOW3 (Object): Register DateTime at the object management
The PHP-built-in DateTime class is unknown to the Object Manager, yet
it is used at several places, such as the persistence framework. Any
try to get further information about this class (such as what scope
it has), results in an exception thrown by the Object Manager.
This patch pre-registers DateTime and therefore adds Object Manager
support for it.
Resolves: #10341
Change-Id: I2fa63525fd40b838d8bc1464b6b86357e057103e
History
#1 Updated by Robert Lemke almost 5 years ago
- Status changed from Accepted to Under Review
#2 Updated by Robert Lemke almost 5 years ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset db096250945f611663d543b16ef0f8d4b8882297.