兼容php8.1

This commit is contained in:
2022-07-21 09:55:25 +08:00
parent 0b7f5cc2b3
commit b3a4425215
2 changed files with 14 additions and 1 deletions

View File

@@ -234,6 +234,18 @@ if (!function_exists('ua_htmlspecialchars')) {
}
}
if (!function_exists('ua_htmlentities')) {
function ua_htmlentities($string)
{
if (is_null($string)) {
$string = '';
}
return htmlentities($string);
}
}
function build_upload_url($url, $upload_type = null)
{

View File

@@ -30,5 +30,6 @@ return [
'tpl_replace_string' => [
'__STATIC__' => Env::get('adminsystem.static_path', '/static'),
'__JS__' => '/static/javascript',
]
],
'default_filter' => 'ua_htmlentities', // 默认过滤方法 用于普通标签输出
];