Trim spaw words before checking for empty. Props markjaquith. fixes #1653
git-svn-id: https://develop.svn.wordpress.org/trunk@2891 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
3efbc15533
commit
6f97a857a6
@ -724,7 +724,7 @@ class retrospam_mgr {
|
||||
foreach( $this->comment_list as $comment ) {
|
||||
if( $comment->approved == 1 ) {
|
||||
foreach( $this->spam_words as $word ) {
|
||||
if ( empty( $word ) )
|
||||
if ( empty( trim($word) ) )
|
||||
continue;
|
||||
$fulltext = strtolower($comment->email.' '.$comment->url.' '.$comment->ip.' '.$comment->text);
|
||||
if( strpos( $fulltext, strtolower(trim($word)) ) != FALSE ) {
|
||||
|
Loading…
Reference in New Issue
Block a user