Update lib/AppInfo/Application.php #421

Merged
deblan merged 1 commit from Monica-Wood/side_menu:http_user_agent_check_patch into develop 2025-04-30 08:37:17 +02:00
Showing only changes of commit 8787918547 - Show all commits

Update lib/AppInfo/Application.php
Some checks are pending
ci/woodpecker/pr/build Pipeline is pending approval
ci/woodpecker/pr/security Pipeline is pending approval

The current change is currently filling the nextcloud logs up with the error:
`Undefined array key \"HTTP_USER_AGENT\" at /srv/www/nextcloud/apps/side_menu/lib/AppInfo/Application.php#109`

This adds a check to ensure the index exists before read it.
Monica-Wood 2025-04-30 07:31:13 +02:00

View file

@ -106,7 +106,7 @@ class Application extends App implements IBootstrap
protected function isEnabled(): bool
{
if (preg_match('/MemoriesNative/', $_SERVER['HTTP_USER_AGENT'])) {
if (isset($_SERVER["HTTP_USER_AGENT"]) && preg_match('/MemoriesNative/', $_SERVER['HTTP_USER_AGENT'])) {
return false;
}