You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Error: Call to a member function format() on a non-object
File /..../vendor/cakephp/cakephp/src/Database/Type/DateTimeType.php
Line: 62
Cake\Database\Type\DateTimeType::toDatabase($value, Driver $driver) method doesn't check if $value is null and it tries to use a method on it $value->format($this->_format);
The text was updated successfully, but these errors were encountered:
To reproduce:
create a table posts with a DATETIME nullable field publication_date
in controller try to save null value for that field
A fatal error was triggered
Cake\Database\Type\DateTimeType::toDatabase($value, Driver $driver)
method doesn't check if$value
is null and it tries to use a method on it$value->format($this->_format);
The text was updated successfully, but these errors were encountered: