mirror of
https://github.com/Karaka-Management/phpOMS.git
synced 2026-01-11 01:38:41 +00:00
fix datetime value bug
This commit is contained in:
parent
39418dbe23
commit
d42fee56af
|
|
@ -648,12 +648,12 @@ final class ReadMapper extends DataMapperAbstract
|
|||
$value = ArrayUtils::setArray($arrayPath, $aValue, $value, '/', true);
|
||||
}
|
||||
} elseif ($def['type'] === 'DateTime') {
|
||||
$value ??= new \DateTime($value);
|
||||
$value = $value === null ? null : new \DateTime($value);
|
||||
if ($hasPath) {
|
||||
$value = ArrayUtils::setArray($arrayPath, $aValue, $value, '/', true);
|
||||
}
|
||||
} elseif ($def['type'] === 'DateTimeImmutable') {
|
||||
$value ??= new \DateTimeImmutable($value);
|
||||
$value = $value === null ? null : new \DateTimeImmutable($value);
|
||||
if ($hasPath) {
|
||||
$value = ArrayUtils::setArray($arrayPath, $aValue, $value, '/', true);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user