note 91283 deleted from function.strpos by googleguy

From: Date: Tue, 22 Oct 2013 08:04:37 +0000
Subject: note 91283 deleted from function.strpos by googleguy
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-196798@lists.php.net to get a copy of this message
Note Submitter: bob at mailinator dot com ---- I found in a certain bit of my code that under certain circumstances, $needle could be an empty string. This caused strpos to generate an error message. To get round it, I had to first test to see if $needle was an empty string, and then (ie 'else') go forward and do the strpos test if not.

« previous php.notes (#196798) next »