From 9a2e3a52c9728c26d99f0034b5db1d6d4e6a1c62 Mon Sep 17 00:00:00 2001 From: Mikael Nordfeldth Date: Tue, 15 Jul 2014 20:38:58 +0200 Subject: [PATCH] Don't access HTTP_USER_AGENT if it doesn't exist --- plugins/MobileProfile/MobileProfilePlugin.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/MobileProfile/MobileProfilePlugin.php b/plugins/MobileProfile/MobileProfilePlugin.php index bf16cd9f56..98fcb472fa 100644 --- a/plugins/MobileProfile/MobileProfilePlugin.php +++ b/plugins/MobileProfile/MobileProfilePlugin.php @@ -72,7 +72,7 @@ class MobileProfilePlugin extends WAP20Plugin } else if (isset($_COOKIE['MobileOverride'])) { // Cookie override is controlled by link at bottom. $this->serveMobile = (bool)$_COOKIE['MobileOverride']; - } else { + } elseif (array_key_exists('HTTP_USER_AGENT', $_SERVER)) { // If they like the WAP 2.0 mimetype, serve them MP // @fixme $type is undefined, making this if case useless and spewing errors. // What's the intent?