diff --git a/DataStorage/Database/DataMapperAbstract.php b/DataStorage/Database/DataMapperAbstract.php index ce98f6b26..5d05f2c55 100644 --- a/DataStorage/Database/DataMapperAbstract.php +++ b/DataStorage/Database/DataMapperAbstract.php @@ -972,7 +972,7 @@ class DataMapperAbstract implements DataMapperInterface settype($value, static::$columns[$column]['type']); $reflectionProperty->setValue($obj, $value); } elseif (static::$columns[$column]['type'] === 'DateTime') { - $reflectionProperty->setValue($obj, new \DateTime($value)); + $reflectionProperty->setValue($obj, new \DateTime($value ?? '')); } elseif (static::$columns[$column]['type'] === 'Json') { $reflectionProperty->setValue($obj, json_decode($value, true)); } elseif (static::$columns[$column]['type'] === 'Serializable') {