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:
Ryan Boren 2005-09-19 02:17:41 +00:00
parent 3efbc15533
commit 6f97a857a6
1 changed files with 1 additions and 1 deletions

View File

@ -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 ) {