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

plugins - PHP Warning: call_user_func_array() expects parameter 1 to be a valid callback Error without any function name

programmeradmin2浏览0评论

I am getting the following php error:

PHP Warning:  call_user_func_array() expects parameter 1 to be a valid callback, function '' not found or invalid function name in /home/example/public_html/wp-includes/class-wp-hook.php on line 286

The issue is that there is no function name mentioned, how can I identify which function is causing this error?

I am getting the following php error:

PHP Warning:  call_user_func_array() expects parameter 1 to be a valid callback, function '' not found or invalid function name in /home/example/public_html/wp-includes/class-wp-hook.php on line 286

The issue is that there is no function name mentioned, how can I identify which function is causing this error?

Share Improve this question asked Nov 20, 2019 at 8:25 dc09dc09 1952 silver badges14 bronze badges 1
  • 1 That error suggests that there's a call made to add_action() or add_filter() where the callback is an "empty" one - e.g. it's '' as in add_action( 'init', '' ) or maybe add_action( 'hook_name', $func ) where $func is empty (NULL, '', etc.). Query Monitor can help you identify the hook name and also the plugin/theme file, if it's caused by a code in a plugin or the active theme. – Sally CJ Commented Nov 20, 2019 at 11:25
Add a comment  | 

1 Answer 1

Reset to default 0

There was a filter in the child theme causing the issue:

add_action('excerpt_length','')

与本文相关的文章

发布评论

评论列表(0)

  1. 暂无评论