mirror of
https://gitee.com/fastadminnet/framework.git
synced 2026-07-06 15:02:47 +08:00
改进类型转换为array的时候输出判断
This commit is contained in:
@@ -508,7 +508,7 @@ abstract class Model implements \JsonSerializable, \ArrayAccess
|
||||
$value = json_decode($value, true);
|
||||
break;
|
||||
case 'array':
|
||||
$value = is_null($value) ? [] : json_decode($value, true);
|
||||
$value = empty($value) ? [] : json_decode($value, true);
|
||||
break;
|
||||
case 'object':
|
||||
$value = empty($value) ? new \stdClass() : json_decode($value);
|
||||
|
||||
Reference in New Issue
Block a user