Re: Bug #1264: strstr() misused in shared.inc

From: Date: Thu, 25 Mar 1999 21:06:45 +0000
Subject: Re: Bug #1264: strstr() misused in shared.inc
References: 1  Groups: php.dev 
Request: Send a blank email to php-dev+get-4762@lists.php.net to get a copy of this message
On Thu, Mar 25, 1999 at 05:33:54PM -0000, maarnold@gte.net wrote: > From: maarnold@gte.net > 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@schell.de | for PGP public key -- PHP Development Mailing List http://www.php.net/ To unsubscribe send an empty message to php-dev-unsubscribe@lists.php.net For help: php-dev-help@lists.php.net

« previous php.dev (#4762) next »