From cf9735284d55aa1f8dcd3a4c6e683d4a1c369c85 Mon Sep 17 00:00:00 2001 From: ryan Date: Mon, 19 Sep 2005 02:17:41 +0000 Subject: [PATCH] Trim spaw words before checking for empty. Props markjaquith. fixes #1653 git-svn-id: http://svn.automattic.com/wordpress/trunk@2891 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/classes.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wp-includes/classes.php b/wp-includes/classes.php index ff1fb6acfc..58e6f2b09d 100644 --- a/wp-includes/classes.php +++ b/wp-includes/classes.php @@ -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 ) {