KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
I have a DateTime field: /** * Date time posted * @Column(type="datetime") */ private $dtPosted; which is set to a default value by using a LifeCycleCallback /** * @PrePersist */ function onPrePersist() { // set default date $this->dtPosted = date('Y-m-d H:m:s'); I am getting the following error: Fatal error: Call to a member function format() on a non-object in D:\ResourceLibrary\Frameworks\Doctrine\lib\Doctrine\DBAL\Types\DateTimeType.php on line 46
Tags (comma-separated)
Save Edits
Cancel