Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

fix unkown http agent

  • Loading branch information...
commit 9b77c90f241a270e4d3aaefb050ed3ef3767ac63 1 parent bffe263
@ronalfei authored
Showing with 3 additions and 2 deletions.
  1. +3 −2 lib/core/util.class.php
View
5 lib/core/util.class.php
@@ -24,7 +24,7 @@ public static function getUserIp( $offset=0 )
public static function getUserBroswer()
{
- $agent = $_SERVER['HTTP_USER_AGENT'];
+ $agent = empty($_SERVER['HTTP_USER_AGENT'])?'unkown':$_SERVER['HTTP_USER_AGENT'];
if (preg_match('/Firefox/i', $agent)) {
@header('Browser:Firefox');
return "firefox";
@@ -61,7 +61,7 @@ public static function getUserBroswer()
}
else
{
- @header('Browser:else');
+ @header('Browser:unkown');
return 'firefox';
}
}
@@ -71,6 +71,7 @@ public static function getUserBroswer()
*/
public static function createUuId()
{
+
$time = microtime();
$tmp = explode(" ", $time);
$milTime = $tmp[1].$tmp[0]*1000000;
Please sign in to comment.
Something went wrong with that request. Please try again.