diff --git a/util/crayon_util.class.php b/util/crayon_util.class.php index ca4790fe..512ffda4 100644 --- a/util/crayon_util.class.php +++ b/util/crayon_util.class.php @@ -790,7 +790,7 @@ public static function preg_escape_back($string) { // Detect if on a Mac or PC public static function is_mac($default = FALSE) { - $user = $_SERVER['HTTP_USER_AGENT']; + $user = isset( $_SERVER['HTTP_USER_AGENT'] ) ? $_SERVER['HTTP_USER_AGENT'] : ''; if (stripos($user, 'macintosh') !== FALSE) { return TRUE; } else if (stripos($user, 'windows') !== FALSE || stripos($user, 'linux') !== FALSE) {