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
* 网址:https://lang.ma/
* 个性:https://oba.by/
* 本文标题: 《Ticket #11289, IE bug fix Error》
* 本文链接:https://danteng.me/2010/12/2259
* 短链接:https://oba.by/?p=2259
* 转载文章请标明文章来源,原文标题以及原文链接。请遵从 《署名-非商业性使用-相同方式共享 2.5 中国大陆 (CC BY-NC-SA 2.5 CN) 》许可协议。


You may also like

1 comment

发表回复

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