WordPress.org

Ready to get started?Download WordPress

Forums

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

  1. ash.matadeen
    Member
    Posted 3 years ago #

    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 );
  2. kesh
    Member
    Posted 3 years ago #

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

  3. ash.matadeen
    Member
    Posted 3 years ago #

    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.

  4. edwinkort
    Member
    Posted 3 years ago #

    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 :(

  5. AndyiBM
    Member
    Posted 3 years ago #

    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.

  6. corizzo
    Member
    Posted 3 years ago #

    AndyiBM- which plugin?

  7. AndyiBM
    Member
    Posted 3 years ago #

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

  8. Funstacy
    Member
    Posted 3 years ago #

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

  9. jboontje
    Member
    Posted 3 years ago #

    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)

  10. Jay Hoffmann
    Member
    Posted 3 years ago #

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

  11. SVP1971
    Member
    Posted 3 years ago #

    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

  12. kumar
    Member
    Posted 2 years ago #

    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

Topic Closed

This topic has been closed to new replies.

About this Topic