mirror of
https://github.com/nextcloud/server.git
synced 2026-04-23 15:21:00 -04:00
Check if HTTP_USER_AGENT is set before using it
Sentry reported some errors regarding this. Apparently not everybody sets a user agent. If it is not set we assume this is not IE ;) Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
This commit is contained in:
parent
bee65f8053
commit
c74a5250e5
1 changed files with 4 additions and 0 deletions
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue