Bug #10341

DateTime properties cannot be persisted

Added by Robert Lemke about 11 years ago. Updated almost 11 years ago.

Status:
Resolved
Priority:
Should have
Assignee:
Category:
Object
Start date:
2010-10-19
Due date:
% Done:

100%

Estimated time:
PHP Version:
Has patch:
Complexity:

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.

#1

Updated by Robert Lemke about 11 years ago

  • Status changed from Accepted to Under Review
#2

Updated by Robert Lemke almost 11 years ago

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

Also available in: Atom PDF