diff options
author | Thomas Müller <thomas.mueller@tmit.eu> | 2015-11-18 17:27:17 +0300 |
---|---|---|
committer | Lukas Reschke <lukas@owncloud.com> | 2015-11-22 18:05:50 +0300 |
commit | 358858c9e3f06560b67b69e1d15c141debb2729a (patch) | |
tree | 628d5c900c0ef3ef2882166e3229413ad75b530e /lib | |
parent | e8661a6b563129f95f7d98322006feb9da8e2c7c (diff) |
Fix undefined HTTP_USER_AGENT
Diffstat (limited to 'lib')
-rw-r--r-- | lib/private/appframework/http/request.php | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/private/appframework/http/request.php b/lib/private/appframework/http/request.php index 96620838dfb..8400882b88f 100644 --- a/lib/private/appframework/http/request.php +++ b/lib/private/appframework/http/request.php @@ -674,6 +674,9 @@ class Request implements \ArrayAccess, \Countable, IRequest { * @return bool true if at least one of the given agent matches, false otherwise */ public function isUserAgent(array $agent) { + if (!isset($this->server['HTTP_USER_AGENT'])) { + return false; + } foreach ($agent as $regex) { if (preg_match($regex, $this->server['HTTP_USER_AGENT'])) { return true; |