Fix PHP8 warning if $_SERVER['HTTP_USER_AGENT'] is not set
This commit is contained in:
parent
337ac3c5d9
commit
f4accec37c
1 changed files with 3 additions and 1 deletions
|
@ -812,7 +812,9 @@ class kolab_dav_client
|
|||
$request->setConfig($http_config);
|
||||
|
||||
// proxy User-Agent string
|
||||
$request->setHeader('user-agent', $_SERVER['HTTP_USER_AGENT']);
|
||||
if (isset($_SERVER['HTTP_USER_AGENT'])) {
|
||||
$request->setHeader('user-agent', $_SERVER['HTTP_USER_AGENT']);
|
||||
}
|
||||
|
||||
// cleanup
|
||||
$request->setBody('');
|
||||
|
|
Loading…
Add table
Reference in a new issue