Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion application/common/controller/Backend.php
Original file line number Diff line number Diff line change
Expand Up @@ -577,7 +577,10 @@ protected function selectpage()
$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 = array_map("htmlentities", $result);
// 修改为安全的htmlentities调用,兼容php8+版本
$result = array_map(function($value) {
return $value === null ? '' : htmlentities((string)$value);
}, $result);
$list[] = $result;
}
if ($istree && !$primaryvalue) {
Expand Down