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
After upgrade from B1 to B2 my app stopped working, throwing ConversionException on nullable DateTime field, value of which is null.
There is part of DateTimeType.php which causes it - if (!$val) matches even the valid null value.
public function convertToPHPValue($value, AbstractPlatform $platform)
{
$val = ($value !== null)
? \DateTime::createFromFormat($platform->getDateTimeFormatString(), $value) : null;
if (!$val) {
throw ConversionException::conversionFailed($value, $this->getName());
}
return $val;
}
The text was updated successfully, but these errors were encountered:
This is a bug in the ConversionException code, sorry for that i will fix it tonight.
Btw, you are not using Beta2 but trunk, the ConversionException code was just committed yesterday. Additionally you should use the ORM with the Beta2 not with trunk of DBAL, they don't work together currently in some aspects (SchemaTool)
Jira issue originally created by user koubas:
After upgrade from B1 to B2 my app stopped working, throwing ConversionException on nullable DateTime field, value of which is null.
There is part of DateTimeType.php which causes it - if (!$val) matches even the valid null value.
The text was updated successfully, but these errors were encountered: