Warning: call_user_func_array() expects parameter 1 to be a valid callback, no array or string given

call_user_func_array() expects parameter 1 to be a valid callback codeigniter
call_user_func_array() expects parameter 1 to be a valid callback laravel
call_user_func_array() expects parameter 1 to be a valid callback drupal
call_user_func() expects parameter 1 to be a valid callback magento 2
call_user_func_array not working
call_user_func_array exception
php callback with arguments
call_user_func_array() expects parameter 2 to be array

I am on my WordPress website and these duplicate messages pop up on my dashboard. I am using WordPress 4.7.1. I do NOT have the FeedWordPress plugin on my site as I saw they had an issue with this error as well.

Warning: call_user_func_array() expects parameter 1 to be a valid callback, no array or string given in /home/mydomain/public_html/wp-includes/class-wp-hook.php on line 298

Warning: call_user_func_array() expects parameter 1 to be a valid callback, no array or string given in /home/mydomain/public_html/wp-includes/class-wp-hook.php on line 298

This line is 298

$value = call_user_func_array( $the_['function'], $args );

This is the function that contains line 298

public function apply_filters( $value, $args ) {
    if ( ! $this->callbacks ) {
        return $value;
    }

    $nesting_level = $this->nesting_level++;

    $this->iterations[ $nesting_level ] = array_keys( $this->callbacks );
    $num_args = count( $args );

    do {
        $this->current_priority[ $nesting_level ] = $priority = current( $this->iterations[ $nesting_level ] );

        foreach ( $this->callbacks[ $priority ] as $the_ ) {
            if( ! $this->doing_action ) {
                $args[ 0 ] = $value;
            }

            // Avoid the array_slice if possible.
            if ( $the_['accepted_args'] == 0 ) {
                $value = call_user_func_array( $the_['function'], array() );
            } elseif ( $the_['accepted_args'] >= $num_args ) {
                $value = call_user_func_array( $the_['function'], $args );
            } else {
                $value = call_user_func_array( $the_['function'], array_slice( $args, 0, (int)$the_['accepted_args'] ) );
            }
        }
    } while ( false !== next( $this->iterations[ $nesting_level ] ) );

    unset( $this->iterations[ $nesting_level ] );
    unset( $this->current_priority[ $nesting_level ] );

    $this->nesting_level--;

    return $value;
}

Is this a serious warning? If so, how would I fix this?

Just to update this thread - I had the same error upgrading to 4.7.2. I deactivated my plugins one by one and found one to cause the problem

Error: call_user_func_array() expects parameter 1 to be a valid , Could also be add_action() . Find that piece Warning: call_user_func_array(). it is usually caused by a filter or an action not properly declared. add_filter The priority must be outside the callback array parameter. this fixed my issue. I had put a space at the end on my call back string on calling the filter Warning: call_user_func_array () expects parameter 1 to be a valid callback, no array or string given in theme_get_registry () (line 277 of /home/martin/www/green/includes/theme.inc). The warning has been noticed when used with the Omega 4 theme. It does not affect e.g. Bartik.

You said that you deactivated some plugins and that fixed it. What plugin was causing the issue,cuz I am getting the same thing

Warning: call_user_func_array() expects parameter 1 to be a valid , Warning: call_user_func_array() expects parameter 1 to be a valid callback. This is a recurring error when dealing with actions/filter in WordPress. In my case, it is usually caused by a filter or an action not properly declared. Warning: call_user_func_array() expects parameter 1 to be a valid callback, no array or string given in /home/mydomain/public_html/wp-includes/class-wp-hook.php on line 298. This line is 298. $value = call_user_func_array( $the_['function'], $args ); This is the function that contains line 298.

I had the same issue. I disabled the Slider Revolution plugin and it fixes the issue.

Hope it helpful!

PHP Warning: call_user_func_array() expects parameter 1 , [13-Mar-2019 14:06:25 UTC] PHP Warning: call_user_func_array() expects parameter 1 to be a valid callback, no array or string given in  Warning: call_user_func_array() expects parameter 1 to be a valid callback, no array or string given Hot Network Questions What are the potential vulnerabilities of allowing non-root users to run apt-get?

I am not getting the exact solution, but I got a temporary solution for immediate basis, 
just hide it, I use the function on the top of the file after 
'<?php' start. It disables the warning.

                define('WP_DEBUG_DISPLAY', false); //It's work for me

                You may also try

                ini_set('display_errors','Off');
                ini_set('error_reporting', E_ALL );
                define('WP_DEBUG', false);

[Solved] Warning: call_user_func_array() expects parameter 1 to be , Warning: call_user_func_array() expects parameter 1 to be a valid callback, no array or string given · php wordpress. I am on my WordPress  Warning: call_user_func_array () expects parameter 1 to be a valid callback, array must have exactly two members in /home/account/public_html/ksenia.se/wp-includes/class-wp-hook.php on line 286 The health control says “A plugin has prevented updates by disabling wp_version_check ()”

This warning occurs when you add a function instead of a string in the callback argument of wordpress action hook. For an example: This will cause the warning:

add_action("wp_enqueue_scripts",somefunction());

But this will not:

add_action("wp_enqueue_scripts","somefunction");

Or, This warning can also occur if the file containing that "somefunction" was not included.

These were the cases the warning was reproduced by me.

call_user_func_array - Manual, Warning: call_user_func_array() expects parameter 1 to be a valid callback, function 'newsmag_login_errors()' not found or invalid function  Warning: call_user_func_array() expects parameter 1 to be a valid callback call_user_func_array() expects parameter 1 to be a valid callback, function ‘maybe

Portfolio Category: Commerical, call_user_func_array — Call a callback with an array of parameters Calls the callback given by the first parameter with the parameters in param_arr . Furthermore, this does not apply to internal functions, for which the function function expects a parameter by reference results in a warning and having call_user_func()  Warning: call_user_func_array() expects parameter 1 to be a valid callback, no array or string given

Water Treatment Grounds Security Audits – PW Makar, warning: call_user_func_array() [function.call-user-func-array]: First argument is expected to be a valid callback, 'imce_access' was given in expects parameter 1 to be a valid callback, function XX not found or invalid. Warning: call_user_func_array() expects parameter 1 to be a valid callback, no array or string given in C:\xampp\htdocs\marine\wordpress\wp-content\plugins\timber-library\lib\Twig.php on line 268. Steps to reproduce this behavior Changed all files in timber-starter-theme to my mine. Changed base.twig, html-header.twig, footer.twig

Warning: call_user_func_array() expects parameter 1 to be a valid callback, no array or string given in /var/www/html/wp-includes/class-wp-hook.php on line 286​ 

Comments
  • wordpress.org/support/topic/… and cross-site dupe
  • I'm willing to bet the problem is with add_filter and wherever you're telling WP to call this
  • Unfortunately the error is misleading. The problem may be occurring on the line listed however it's triggered elsewhere
  • Please post the plugin name to help other users.