diff --git a/CHANGELOG.md b/CHANGELOG.md index d49e858..9279c3a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ ## [Unreleased] +## 5.0.3 +### Fixed +* fix #422: undefined array key "HTTP_USER_AGENT" + ## 5.0.2 ### Fixed * fix #413: add user-agent check for memories mobile app diff --git a/appinfo/info.xml b/appinfo/info.xml index 7fd8755..ad353fd 100644 --- a/appinfo/info.xml +++ b/appinfo/info.xml @@ -30,7 +30,7 @@ Notice Because I believe in a free and decentralized Internet, [Gitnet](https://gitnet.fr) is **self-hosted at home**. In case of downtime, you can download **Custom Menu** from [here](https://kim.deblan.fr/~side_menu/). ]]> - 5.0.2 + 5.0.3 agpl Simon Vieille SideMenu 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; }