mirror of https://gitee.com/karson/fastadmin.git
简化代码
parent
f804c8a460
commit
c13b9eb147
|
|
@ -581,7 +581,7 @@ class Backend extends Controller
|
|||
} else {
|
||||
$result = array_intersect_key(($item instanceof Model ? $item->toArray() : (array)$item), array_flip($fields));
|
||||
}
|
||||
$result['pid'] = isset($item['pid']) ? $item['pid'] : (isset($item['parent_id']) ? $item['parent_id'] : 0);
|
||||
$result['pid'] = (int)($item['pid'] ?? $item['parent_id'] ?? 0);
|
||||
// 修改为安全的htmlentities调用,兼容php8+版本
|
||||
$result = array_map(function($value) {
|
||||
return $value === null ? '' : htmlentities((string)$value);
|
||||
|
|
|
|||
Loading…
Reference in New Issue