优化 php8 兼容

pull/447/head
F4nniu 2023-07-17 15:04:20 +08:00
parent 927510f5ad
commit a64cf1173f
2 changed files with 3 additions and 3 deletions

View File

@ -319,8 +319,8 @@ class Addon extends Backend
{
$offset = (int)$this->request->get("offset");
$limit = (int)$this->request->get("limit");
$filter = $this->request->get("filter") ?? '';
$search = $this->request->get("search") ?? '';
$filter = $this->request->get("filter", '');
$search = $this->request->get("search", '');
$search = htmlspecialchars(strip_tags($search));
$onlineaddons = $this->getAddonList();
$filter = (array)json_decode($filter, true);

View File

@ -63,7 +63,7 @@ class Common
}
// 切换多语言
if (Config::get('lang_switch_on')) {
$lang = $request->get('lang');
$lang = $request->get('lang', '');
if (preg_match("/^([a-zA-Z\-_]{2,10})\$/i", $lang)) {
\think\Cookie::set('think_var', $lang);
}