From e0bffdaf03dc88086fa359601d047cdf8a472db3 Mon Sep 17 00:00:00 2001 From: ryan Date: Mon, 19 Sep 2005 02:49:53 +0000 Subject: [PATCH] Do over to avoid write context warning. git-svn-id: http://svn.automattic.com/wordpress/trunk@2892 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/classes.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/wp-includes/classes.php b/wp-includes/classes.php index 58e6f2b09..46948bac7 100644 --- a/wp-includes/classes.php +++ b/wp-includes/classes.php @@ -724,10 +724,11 @@ class retrospam_mgr { foreach( $this->comment_list as $comment ) { if( $comment->approved == 1 ) { foreach( $this->spam_words as $word ) { - if ( empty( trim($word) ) ) + $word = trim($word); + if ( empty( $word ) ) continue; $fulltext = strtolower($comment->email.' '.$comment->url.' '.$comment->ip.' '.$comment->text); - if( strpos( $fulltext, strtolower(trim($word)) ) != FALSE ) { + if( strpos( $fulltext, strtolower($word) ) != FALSE ) { $this->found_comments[] = $comment->ID; break; }