From 8787918547131ae59e1d7ed4356ba23e307f06bb Mon Sep 17 00:00:00 2001 From: Monica-Wood Date: Wed, 30 Apr 2025 07:31:13 +0200 Subject: [PATCH] Update lib/AppInfo/Application.php 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. --- lib/AppInfo/Application.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/AppInfo/Application.php b/lib/AppInfo/Application.php index c255ae3..f4fceb0 100644 --- a/lib/AppInfo/Application.php +++ b/lib/AppInfo/Application.php @@ -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; }