I've read the other posts about this issue, but mine is different in one fundamental way... there is no function defined in the error. It reads like this:
Warning: call_user_func_array() expects parameter 1 to be a valid callback, function '' not found or invalid function name in /home/ovbar/public_html/wp-includes/plugin.php on line 496
I've never seen this error without a function defined so I'm at a loss. I moved it using the All-in-One WP Migration
plugin. Any ideas? Here's what I've done so far:
Every other aspect of the site works fine. This error only displays on the front end.
Any ideas?
I've read the other posts about this issue, but mine is different in one fundamental way... there is no function defined in the error. It reads like this:
Warning: call_user_func_array() expects parameter 1 to be a valid callback, function '' not found or invalid function name in /home/ovbar/public_html/wp-includes/plugin.php on line 496
I've never seen this error without a function defined so I'm at a loss. I moved it using the All-in-One WP Migration
plugin. Any ideas? Here's what I've done so far:
Every other aspect of the site works fine. This error only displays on the front end.
Any ideas?
I've successfully tracked this problem by adding
error_log("wp-hook: ". print_r($the_, true));
within apply_filters in wp-includes/wp_hook.php
The task is then to look at the function calls (the data inside $the_) surrounding the "PHP Warning: call_user_func_array()". It will be the one directly ahead of the warning, but you may need to look at calls after or before to determine which file is causing the problem (a filter call to an undefined function).
Note also that the problem will arise if the function exists, but has no code, like:
function create_menu() {
//oops, there's no code here
}
add_action('admin_menu',array($this,'create_menu'));
add_action
in "wp-includes/plugin.php" line 431 puttingif ( empty( $function_to_add ) ) echo '<pre>', debug_print_backtrace(), '</pre>';
. – bonger Commented Jan 24, 2015 at 11:53error_reporting(0);
to the bottom of my wp-config file. It's only for that theme, and I'm going to be reworking it anyway. I went through the theme (poorly built) and commented out all of theadd_action()
s and the error still displayed, but if I switch themes it's gone. So for now, turning off warnings will do. – KingRichard Commented Jan 25, 2015 at 1:38