ragazzi ciau vi volevo chiedere un aiuto per sistemare questo mio nuovo problema:

Codice PHP:
function isblocked($str,$sender)
{
  if(
ismod($sender))
  {
    return 
false;
  }
  
$str str_replace(" ","",$str);
  
$str strtolower($str);
    
$res mysql_query("SELECT site FROM tabella_blockedsite");
while (
$row mysql_fetch_array($res)) 
{
   
$sites[] = $row[0];
}
  for(
$i=0;$i<count($sites);$i++)
  {
        
$nosf substr_count($str,$sites[$i]);
    if(
$nosf>0)
    {
      return 
true;
    }
  }
  return 
false;

il problema è il seguente:


Warning: substr_count() [function.substr-count]: Empty substring in /var/www/vhosts/miosito.net/httpdocs/includes/function.php on line 1209


chi mi sa aiutare a sistemarlo?
la linea 1209 è questa:

$nosf = substr_count($str,$sites[$i]);


grazie a chi mi aiuterà