top-think / think-orm

Think ORM——the PHP Database&ORM Framework
Apache License 2.0
413 stars 171 forks source link

3.0.25 模型使用value方法获取字段值有问题 #625

Closed jesuer closed 2 weeks ago

jesuer commented 2 weeks ago

3.0.25 模型使用value获取字段值时,如果字段是json,不会自动转为数组

比如:User::where('id',1)->value('likes');

返回:"['踢球','旅游']"

3.0.25 之前的版本

返回:['踢球','旅游']

image

源码中这里没有处理,修改为如下:

image

liu21st commented 2 weeks ago

已经修正 感谢反馈