summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorRoeland Jago Douma <rullzer@users.noreply.github.com>2018-08-08 13:59:31 +0200
committerGitHub <noreply@github.com>2018-08-08 13:59:31 +0200
commite7e30ac25f05706ba7898bcb295d85bbcd0ec3c2 (patch)
treebe95e3f7d35f0dae1d2b906c580ed2527a0deb43 /lib
parent388403876571cde932d5406b57bb2d6638deb403 (diff)
parentc74a5250e5b2a34ee8e070cfc6ee7fac8c06891b (diff)
downloadnextcloud-server-e7e30ac25f05706ba7898bcb295d85bbcd0ec3c2.tar.gz
nextcloud-server-e7e30ac25f05706ba7898bcb295d85bbcd0ec3c2.zip
Merge pull request #10586 from nextcloud/fix/noid/check_if_ua_is_set
Check if HTTP_USER_AGENT is set before using it
Diffstat (limited to 'lib')
-rw-r--r--lib/private/legacy/util.php4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/private/legacy/util.php b/lib/private/legacy/util.php
index a581397212a..1b9f52008fd 100644
--- a/lib/private/legacy/util.php
+++ b/lib/private/legacy/util.php
@@ -1535,6 +1535,10 @@ class OC_Util {
* @return boolean
*/
public static function isIe() {
+ if (!isset($_SERVER['HTTP_USER_AGENT'])) {
+ return false;
+ }
+
return preg_match(Request::USER_AGENT_IE, $_SERVER['HTTP_USER_AGENT']) === 1;
}