PHP8에서 나오는 PHP Warning: Undefined array key "HTTP_USER_AGENT" 오류 수정

This commit is contained in:
kagla
2021-09-16 06:05:07 +00:00
parent f283e6c3d9
commit abe801a7ac

View File

@ -14,7 +14,9 @@ if (get_cookie('ck_visit_ip') != $_SERVER['REMOTE_ADDR'])
$referer = "";
if (isset($_SERVER['HTTP_REFERER']))
$referer = escape_trim(clean_xss_tags(strip_tags($_SERVER['HTTP_REFERER'])));
$user_agent = escape_trim(clean_xss_tags(strip_tags($_SERVER['HTTP_USER_AGENT'])));
$user_agent = '';
if (isset($_SERVER['HTTP_USER_AGENT']))
$user_agent = escape_trim(clean_xss_tags(strip_tags($_SERVER['HTTP_USER_AGENT'])));
$vi_browser = '';
$vi_os = '';
$vi_device = '';