Bug #1398 Updated: wrong return value

From: Date: Tue, 11 May 1999 11:55:52 +0000
Subject: Bug #1398 Updated: wrong return value
Groups: php.dev 
Request: Send a blank email to php-dev+get-5506@lists.php.net to get a copy of this message
ID: 1398 Updated by: sas Reported By: thomas@intermezzo.de Status: Closed Bug Type: Misbehaving function Assigned To: Comments: Your comparison is not correct. See http://www.php.net/manual/html/function.strpos.html In short, strpos returns false, if the needle is not found. If you compare false with an integer, it is promoted to 0 and as such the expression in the if(...) construct is true. Full Bug description available at: http://bugs.php.net?id=1398 -- 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 (#5506) next »