note 55048 deleted from function.str-ireplace by aidan
| From: | aidan@php.net | Date: | Sun, 24 Jul 2005 04:17:22 +0000 |
| Subject: | note 55048 deleted from function.str-ireplace by aidan | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-92359@lists.php.net to get a copy of this message | ||
Note Submitter: bill
----
Whatch out on solution provided bu (kosta dot krauth at zg dot htnet dot hr). I've used it in
my spammersblog at http://www.spammersblog.com . It has
nasty bug in this line:
while($Pos = strpos(strtolower($Haystack), $Needle, $i))
As we can see if Needle occurs at position 0 Haystack won't be checked at all.
You should change this line into:
while(($Pos = strpos(strtolower($Haystack), $Needle, $i)) !== FALSE)
to make this function work proper.