Ticket #11289, IE bug fix Error

In the past 3 days ,every day there were almost 100 spam comments. The Askmit recognized these spams ,but i have to delete these spams myself .I dislike to do this ,so i reactived the Math comment spam protection plugin.However the plugin dosen’t work very well, if u post a comment with the answer blank or wrong ,it will just show u the fallow error message like this:





WordPress ? Error



ERROR: Somethin here.


The error message can be located in the wp-includes/functions.php file at the line 2740:

< !DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

>

	
	< ?php echo $title ?>
	
< ?php
if ( 'rtl' == $text_direction ) : ?>
	
< ?php endif; ?>


< ?php endif; ?>
	< ?php echo $message; ?>


But the error was caused by the wp_die() function in the file plugins/math-comment-spam-protection/math-comment-spam-protection.php at the line 217:

switch ($result) {
  case 'No answer': 
      wp_die( apply_filters('pre_comment_content', stripslashes($this->g_opt['mcsp_opt_msg_wrong_answer'])) );
      break;
 case 'Wrong answer': 
     wp_die( apply_filters('pre_comment_content', stripslashes($this->g_opt['mcsp_opt_msg_wrong_answer'])) );
     break;
}

The error message was posted by the wp_die() function,vie google i found that the wp_die() funciton is just do the same thing as die() fuction.So i replaced the wp_die() with die(),then the error message disappered.lol.

switch ($result) {
  case 'No answer': 
     echo "";
     die();
     break;
 case 'Wrong answer': 
    echo "";	
    die();
    break;
}

原创文章,转载请注明: 转载自 obaby@mars

本文标题: 《Ticket #11289, IE bug fix Error》

本文链接地址: http://h4ck.org.cn/2010/12/ticket-11289-ie-bug-fix-error/

分享文章:

猜你喜欢:

一条评论

发表评论

您的电子邮箱地址不会被公开。 必填项已用*标注