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
This commit is contained in:
parent
ad3e2f6dba
commit
cf9735284d
|
@ -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