We will be off from 27/1 (Monday) to 31/1 (Friday) (GMT +7) for our Tet Holiday (Lunar New Year) in our country

Commit ea67f3ca authored by cyattilakiss's avatar cyattilakiss Committed by GitHub

Check availability of userAgent and acceptHeader before assigning (#682)

parent 61822472
...@@ -288,10 +288,13 @@ class Requests extends AbstractHelper ...@@ -288,10 +288,13 @@ class Requests extends AbstractHelper
*/ */
public function buildBrowserData($request = []) public function buildBrowserData($request = [])
{ {
$request['browserInfo'] = [ if (!empty($_SERVER['HTTP_USER_AGENT'])) {
'userAgent' => $_SERVER['HTTP_USER_AGENT'], $request['browserInfo']['userAgent'] = $_SERVER['HTTP_USER_AGENT'];
'acceptHeader' => $_SERVER['HTTP_ACCEPT'] }
];
if (!empty($_SERVER['HTTP_ACCEPT'])) {
$request['browserInfo']['acceptHeader'] = $_SERVER['HTTP_ACCEPT'];
}
return $request; return $request;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment