WordPress.org

Support

Support » Plugins and Hacks » Warning: call_user_func_array() [function.call-user-func-array]

Warning: call_user_func_array() [function.call-user-func-array]

  • ash.matadeen

    @ashmatadeen

    I have just uploaded a site to my server and I’m getting this error in relation to plugin.php

    Warning: call_user_func_array() [function.call-user-func-array]: First argument is expected to be a valid callback, ‘cp_admin_init’ was given in /…/html/…/wp-includes/plugin.php on line 395

    Any clues as to what this means? Oddly enough, the same site runs just fine if I run it on my computer with MAMP.

    Line 395 of plugin.php consists of:

    do {
    		foreach ( (array) current($wp_filter[$tag]) as $the_ )
    			if ( !is_null($the_['function']) )
    				call_user_func_array($the_['function'], array_slice($args, 0, (int) $the_['accepted_args']));
    
    	} while ( next($wp_filter[$tag]) !== false );
Viewing 11 replies - 1 through 11 (of 11 total)
  • I’m having this same problem and it’s driving me crazy. Anyone know?

    Hi Kesh,

    It turned out that the cause of this problem was a function call in my theme’s functions.php file. Check if you have this line in your theme’s functions.php:

    add_action('init', 'cp_admin_init');

    I’m not sure what it does but it came with the theme I was working with. Comment it out and see if it solves the problem. It worked for me.

    Getting the same error after trying to create custom posts with changing functions.php. Using arras theme.
    Everything works, but showing the mentioned error everywhere 🙁

    I’ve just installed 3.2 and I’ve started getting the error ONLY on the ‘Widgets’ screen.

    I don’t the add_action line of code (from ash.matadeen above) in my functions.php file.

    I deactivated all plugins, and the error cleared.

    Reactivated one at a time, and found the offending plugin. Informed the plugin author.

    AndyiBM- which plugin?

    hey Corizzo, It’s the WYSIWYG Widget. Danny has now fixed it for 3.2

    weird, I removed that line too and it worked. Thanks for the tip ash.matadeen

    Thanks! Commented a certain line out and it worked.

    My theme started giving this error after updating to WordPress 3.2.1, and the problem was not caused by a plugin I had installed (even though it mentions the plugin.php file in the error code)

    jboontje which line did you comment out, I’m having the same problem after updating to 3.2.1

    I’m having this same problem and it’s driving me crazy. Anyone know?
    HELP……..

    Warning: call_user_func_array() [function.call-user-func-array]: First argument is expected to be a valid callback, ‘wp_maybe_load_embeds’ was given in /home/perureg/public_html/wp-includes/plugin.php on line 395

    THANKS

    kumar

    @shiv9891026073

    Hi all
    i am Getting a warning at every page footer area

    Warning: call_user_func_array() expects parameter 1 to be a valid callback, function ‘mp_footer’ not found or invalid function name in D:\xampp\htdocs\wp-test\wp-includes\plugin.php on line 395

    can any one please tell me how to remove this warning

Viewing 11 replies - 1 through 11 (of 11 total)
  • The topic ‘Warning: call_user_func_array() [function.call-user-func-array]’ is closed to new replies.
Skip to toolbar