quiten warning if client sends no User-Agent header

This commit is contained in:
Ralf Becker 2021-08-30 08:54:35 +02:00 committed by nathan
parent 53f156a66b
commit 990c407218

View File

@ -16,7 +16,7 @@ use EGroupware\Api\Egw;
// Rocket.Chat desktop clients ignore /rocketchat/ path in URL and use just /
// --> redirect them back to /rocketchat/
if (strpos($_SERVER['HTTP_USER_AGENT'], 'Rocket.Chat') !== false)
if (strpos($_SERVER['HTTP_USER_AGENT'] ?? '', 'Rocket.Chat') !== false)
{
header('Location: /rocketchat/');
exit;