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 Answer
Reset to default 0There was a filter in the child theme causing the issue:
add_action('excerpt_length','')
add_action()
oradd_filter()
where the callback is an "empty" one - e.g. it's''
as inadd_action( 'init', '' )
or maybeadd_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