Re: [PHP-DEV] Bug #1264: strstr() misused in shared.inc From: Sascha Schumann (sascha <email protected>)
Date: 03/25/99

On Thu, Mar 25, 1999 at 05:33:54PM -0000, maarnold <email protected> wrote:
> From: maarnold <email protected>
> Operating system: linux
> PHP version: 3.0.5
> PHP Bug Type: Misbehaving function
> Bug description: strstr() misused in shared.inc
>
> In your shared.inc used in www.php3.org, the line...
> if ( strstr( "Opera", $HTTP_USER_AGENT ) )
> ...and the line...
> if ( strstr( "X11", $HTTP_USER_AGENT ) )
> ...are used to detect those browsers. The parameters to strstr() are...
> strstr( string to be searched, string being sought )
> That is, strstr() reads "search this string for that string"; not "search
> for this string in that string". Are these uses of strstr() in shared.inc
> backwards, or am I not understanding something?

What for a shared.inc are you talking about? PHP3 does not contain such a
file.

-- 

Regards,

Sascha Schumann | Consultant | finger sas <email protected> | for PGP public key

-- PHP Development Mailing List http://www.php.net/ To unsubscribe send an empty message to php-dev-unsubscribe <email protected> For help: php-dev-help <email protected>