Bug #1264: strstr() misused in shared.inc
| From: | maarnold at gte dot net | Date: | Thu, 25 Mar 1999 17:33:54 +0000 |
| Subject: | Bug #1264: strstr() misused in shared.inc | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-4760@lists.php.net to get a copy of this message | ||
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?
--
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