[pLog-svn] r2411 -
plog/branches/plog-1.0.2/class/net/http/phpsniff
Paul Westbrook
paul at westbrooks.org
Thu Aug 18 15:43:52 GMT 2005
Hello,
Yes. According to the php documentation at
http://us2.php.net/reserved.variables, $_SERVER was introduced in php
version 4.1.0.
--Paul
Jon Daley wrote:
> Just to make sure - you did mean to change the version check from
> 3.0 to 4.1?
>
>
> On Thu, 18 Aug 2005, pwestbro at devel.plogworld.net wrote:
>> 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;
>>
>> _______________________________________________
>> pLog-svn mailing list
>> pLog-svn at devel.plogworld.net
>> http://devel.plogworld.net/mailman/listinfo/plog-svn
>>
>
> **************************************************************
> * * The primary cause of failure *
> * Jon Daley * in electrical appliances is *
> * * an expired warranty. Often, *
> * http://jon.limedaley.com/ * you can get an appliance *
> * * running again simply by *
> * * changing the warranty *
> * * expiration date with a *
> * * 15/64-inch felt-tipped *
> * * marker. *
> * * -- Dave Barry, "The Taming of *
> * * the Screw" *
> **************************************************************
> _______________________________________________
> pLog-svn mailing list
> pLog-svn at devel.plogworld.net
> http://devel.plogworld.net/mailman/listinfo/plog-svn
>
>
--
Paul Westbrook
paul at westbrooks.org
http://www.westbrooks.org
More information about the pLog-svn
mailing list