symfony - Fatal error: Call to a member function format() on a non-object
世界只因有你
世界只因有你 2017-05-16 16:46:05
0
3
1066

Fatal error: Call to a member function format() on a non-object in /var/www/test/openmysfony/vendor/doctrine/dbal/lib/Doctrine/DBAL/Types/DateType.php on line 44

This problem is a bit strange.. Has anyone else encountered it? One is correct and the other is wrong in both the local environment and the server environment.

世界只因有你
世界只因有你

reply all(3)
左手右手慢动作

It is very typical that when instantiating an object, there is no check whether the instantiation is successful, and then the return value is directly called as an object. If there is no error, it is good luck, and if there is an error, it is better luck.

左手右手慢动作

When saving time, you must first convert the passed in time into an object and then save it.

洪涛

$now_time = new Datetime();
$product->setCreateTime($now_time);

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template