Merge pull request #10586 from nextcloud/fix/noid/check_if_ua_is_set
Check if HTTP_USER_AGENT is set before using it
This commit is contained in:
commit
e7e30ac25f
|
@ -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 New Issue