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
I think it's due to DateTime behavior, for example :
$date = new \DateTime("0000-00-00");
in this case, if you dump, you have something like :
object(DateTime)[1]
public 'date' => string '-0001-11-30 00:00:00' (length=20)
public 'timezone_type' => int 3
public 'timezone' => string 'Europe/Paris' (length=12)
with invalid "date" (negative).
May be this trike is an available correction :
new \DateTime('@0')
Edit : reading again, I saw the target is Doctrine, in this case I don't now what happened but for database storage I suppose you can't set the date '0000-00-00' and may be add a Transform for invalid date or null date.
With Pull-Request #35 default values for comments were added. Correct me if I'm wrong but this code will produce
false
als output:So you can't set the date like this as default. I think it is not even possible with standard doctrine components.
The text was updated successfully, but these errors were encountered: