最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

functions - Warning and fatal error

programmeradmin1浏览0评论

I am getting this error when running my website :

Warning: call_user_func_array() expects parameter 1 to be a valid callback, function 'sanitize_comment_cookies' not found or invalid function name in /homepages/9/d346623364/htdocs/wp-includes/class-wp-hook.php on line 286

Fatal error: Cannot redeclare comment_exists() (previously declared in /homepages/9/d346623364/htdocs/wp-includes/comment.php:27) in /homepages/9/d346623364/htdocs/wp-admin/includes/comment.php on line 43

Thanks for your help !

I am getting this error when running my website :

Warning: call_user_func_array() expects parameter 1 to be a valid callback, function 'sanitize_comment_cookies' not found or invalid function name in /homepages/9/d346623364/htdocs/wp-includes/class-wp-hook.php on line 286

Fatal error: Cannot redeclare comment_exists() (previously declared in /homepages/9/d346623364/htdocs/wp-includes/comment.php:27) in /homepages/9/d346623364/htdocs/wp-admin/includes/comment.php on line 43

Thanks for your help !

Share Improve this question asked Apr 24, 2019 at 17:50 daviddavid 1
Add a comment  | 

1 Answer 1

Reset to default 0

Warning: call_user_func_array() expects parameter 1 to be a valid callback, function 'sanitize_comment_cookies' not found or invalid function name in /homepages/9/d346623364/htdocs/wp-includes/class-wp-hook.php on line 286

This means you have a function named sanitize_comment_cookies hooked to an action or filter, either in your theme or a plugin, but that function is not available.

Look for the code: add_action('some_action_name', 'sanitize_comment_cookies') or add_filter('some_filter_name', 'sanitize_comment_cookies') and verify that the function name is correct.


Fatal error: Cannot redeclare comment_exists()

Function comment_exists is defined in wp-admin/includes/comment.php and it should not be in the second location. From the message you can assume that you have modified wp-includes/comment.php file. If that is the case, download the WordPress version you are using and replace the modified file with the original one.

发布评论

评论列表(0)

  1. 暂无评论