[pLog-svn] r2411 - plog/branches/plog-1.0.2/class/net/http/phpsniff

pwestbro at devel.plogworld.net pwestbro at devel.plogworld.net
Thu Aug 18 06:16:21 GMT 2005


Author: pwestbro
Date: 2005-08-18 06:16:20 +0000 (Thu, 18 Aug 2005)
New Revision: 2411

Modified:
   plog/branches/plog-1.0.2/class/net/http/phpsniff/phpSniff.class.php
Log:
Fixed bug http://bugs.plogworld.net/view.php?id=677

Make sure that $HTTP_SERVER_VARS is declared a global before it is used


Modified: plog/branches/plog-1.0.2/class/net/http/phpsniff/phpSniff.class.php
===================================================================
--- plog/branches/plog-1.0.2/class/net/http/phpsniff/phpSniff.class.php	2005-08-14 16:46:22 UTC (rev 2410)
+++ plog/branches/plog-1.0.2/class/net/http/phpsniff/phpSniff.class.php	2005-08-18 06:16:20 UTC (rev 2411)
@@ -191,8 +191,8 @@
         // 20020425 :: besfred
         if(empty($UA)) $UA = getenv('HTTP_USER_AGENT');
         if(empty($UA)) {
-            $pv = explode(".", PHP_VERSION);
-            $UA = ( $pv[0] > 3 && $pv[1] > 0 ) ? $_SERVER['HTTP_USER_AGENT'] : $HTTP_SERVER_VARS['HTTP_USER_AGENT'];
+            global $HTTP_SERVER_VARS;
+            $UA = ( phpversion() >= "4.1.0"  ) ? $_SERVER['HTTP_USER_AGENT'] : $HTTP_SERVER_VARS['HTTP_USER_AGENT'];
         }
         // 20020910 :: rraymond
         if(empty($UA)) return false;




More information about the pLog-svn mailing list