We will be off on April 7th (Monday) for public holiday 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
*/
public function buildBrowserData($request = [])
{
$request['browserInfo'] = [
'userAgent' => $_SERVER['HTTP_USER_AGENT'],
'acceptHeader' => $_SERVER['HTTP_ACCEPT']
];
if (!empty($_SERVER['HTTP_USER_AGENT'])) {
$request['browserInfo']['userAgent'] = $_SERVER['HTTP_USER_AGENT'];
}
if (!empty($_SERVER['HTTP_ACCEPT'])) {
$request['browserInfo']['acceptHeader'] = $_SERVER['HTTP_ACCEPT'];
}
return $request;
}
......@@ -324,7 +327,7 @@ class Requests extends AbstractHelper
$request['origin'] = $this->adyenHelper->getOrigin();
$request['channel'] = 'web';
}
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