mirror of
https://github.com/Karaka-Management/phpOMS.git
synced 2026-02-08 05:18:40 +00:00
Fix data type bug
This commit is contained in:
parent
7a42559deb
commit
a4e89ee7b1
|
|
@ -972,7 +972,7 @@ class DataMapperAbstract implements DataMapperInterface
|
||||||
settype($value, static::$columns[$column]['type']);
|
settype($value, static::$columns[$column]['type']);
|
||||||
$reflectionProperty->setValue($obj, $value);
|
$reflectionProperty->setValue($obj, $value);
|
||||||
} elseif (static::$columns[$column]['type'] === 'DateTime') {
|
} elseif (static::$columns[$column]['type'] === 'DateTime') {
|
||||||
$reflectionProperty->setValue($obj, new \DateTime($value));
|
$reflectionProperty->setValue($obj, new \DateTime($value ?? ''));
|
||||||
} elseif (static::$columns[$column]['type'] === 'Json') {
|
} elseif (static::$columns[$column]['type'] === 'Json') {
|
||||||
$reflectionProperty->setValue($obj, json_decode($value, true));
|
$reflectionProperty->setValue($obj, json_decode($value, true));
|
||||||
} elseif (static::$columns[$column]['type'] === 'Serializable') {
|
} elseif (static::$columns[$column]['type'] === 'Serializable') {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user