Title: PHP Warning: call_user_func_array() expects parameter 1 to be a valid callback
Last modified: March 13, 2019

---

# PHP Warning: call_user_func_array() expects parameter 1 to be a valid callback

 *  Resolved [AiratTop](https://wordpress.org/support/users/airathalitov/)
 * (@airathalitov)
 * [7 years, 2 months ago](https://wordpress.org/support/topic/php-warning-call_user_func_array-expects-parameter-1-to-be-a-valid-callback-3/)
 * Hi!
 * After update Yoast SEO to v10.0 I see a lot of this warnings in logs:
 * `PHP Warning: call_user_func_array() expects parameter 1 to be a valid callback,
   no array or string given in /site_path/wp-includes/class-wp-hook.php on line 
   286`
 * Code:
 *     ```
       // 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'] ) );
       }
       ```
   
 * Yoast SEO v10.0
    WordPress 5.1.0 and 5.1.1 PHP 7.2.16-1+ubuntu16.04.1+deb.sury.
   org+1

Viewing 8 replies - 1 through 8 (of 8 total)

 *  [Saša](https://wordpress.org/support/users/stodorovic/)
 * (@stodorovic)
 * [7 years, 2 months ago](https://wordpress.org/support/topic/php-warning-call_user_func_array-expects-parameter-1-to-be-a-valid-callback-3/#post-11307647)
 * It’s possible if function (which is callback for [add_filter](https://developer.wordpress.org/reference/functions/add_filter/)
   or [https://developer.wordpress.org/reference/functions/add_action/](https://developer.wordpress.org/reference/functions/add_action/))
   doesn’t exist.
 * You should try to flush OPcache and it’s helpful to enable Xdebug (or other solution)
   to get debug trace (you will see in which filter is an issue).
 *  Thread Starter [AiratTop](https://wordpress.org/support/users/airathalitov/)
 * (@airathalitov)
 * [7 years, 2 months ago](https://wordpress.org/support/topic/php-warning-call_user_func_array-expects-parameter-1-to-be-a-valid-callback-3/#post-11307744)
 * I don’t use OPcache
 * This is my WP_DEBUG mode settings:
 *     ```
       /** Enable WP_DEBUG mode */
       define( 'WP_DEBUG', true );
   
       if ( WP_DEBUG ) {
           @error_reporting( E_ALL );
           @ini_set( 'log_errors', true );
           @ini_set( 'log_errors_max_len', '0' );
   
           define( 'WP_DEBUG_LOG', true );
           define( 'WP_DEBUG_DISPLAY', false );
           @ini_set( 'display_errors', 0 );
           define( 'CONCATENATE_SCRIPTS', false );
           define( 'SAVEQUERIES', true );
           define( 'SCRIPT_DEBUG', false );
       }
       ```
   
 * But I don’t see any stack trace. Just this line:
 * `PHP Warning: call_user_func_array() expects parameter 1 to be a valid callback,
   no array or string given in /site_path/wp-includes/class-wp-hook.php on line 
   286`
 *  [Saša](https://wordpress.org/support/users/stodorovic/)
 * (@stodorovic)
 * [7 years, 2 months ago](https://wordpress.org/support/topic/php-warning-call_user_func_array-expects-parameter-1-to-be-a-valid-callback-3/#post-11307770)
 * This gist will explain how to enable the backtrace in your website: [https://gist.github.com/jrfnl/5925642](https://gist.github.com/jrfnl/5925642)
 *  Thread Starter [AiratTop](https://wordpress.org/support/users/airathalitov/)
 * (@airathalitov)
 * [7 years, 2 months ago](https://wordpress.org/support/topic/php-warning-call_user_func_array-expects-parameter-1-to-be-a-valid-callback-3/#post-11308433)
 * As I said here is `wordpress-seo` (Yoast SEO) plugin in Backtrace:
 *     ```
       [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 /site_path/wp-includes/class-wp-hook.php on line 286
       [13-Mar-2019 14:06:26 UTC] Backtrace from warning 'call_user_func_array() expects parameter 1 to be a valid callback, no array or string given' at /site_path/wp-includes/class-wp-hook.php 286: /site_path/wp-includes/plugin.php 208 calling apply_filters() | /site_path/wp-content/plugins/wordpress-seo/frontend/class-remove-reply-to-com.php 81 calling apply_filters() | /site_path/wp-content/plugins/wordpress-seo/frontend/class-remove-reply-to-com.php 23 calling clean_reply_to_com() | /site_path/wp-content/plugins/wordpress-seo/frontend/class-frontend.php 151 calling register_hooks() | /site_path/wp-content/plugins/wordpress-seo/frontend/class-frontend.php 198 calling __construct() | /site_path/wp-content/plugins/wordpress-seo/inc/wpseo-functions.php 19 calling get_instance() | /site_path/wp-includes/class-wp-hook.php 286 calling initialize_wpseo_front() | /site_path/wp-includes/class-wp-hook.php 310 calling apply_filters() | /site_path/wp-includes/plugin.php 465 calling do_action() | /site_path/wp-settings.php 505 calling do_action() | /site_path/wp-config.php 210 calling require_once() | /site_path/wp-load.php 37 calling require_once() | /site_path/wp-blog-header.php 13 calling require_once() | /site_path/index.php 17 calling require()
       ```
   
 *  Thread Starter [AiratTop](https://wordpress.org/support/users/airathalitov/)
 * (@airathalitov)
 * [7 years, 2 months ago](https://wordpress.org/support/topic/php-warning-call_user_func_array-expects-parameter-1-to-be-a-valid-callback-3/#post-11308624)
 * [https://github.com/Yoast/wordpress-seo/issues/12425](https://github.com/Yoast/wordpress-seo/issues/12425)
 *  Thread Starter [AiratTop](https://wordpress.org/support/users/airathalitov/)
 * (@airathalitov)
 * [7 years, 2 months ago](https://wordpress.org/support/topic/php-warning-call_user_func_array-expects-parameter-1-to-be-a-valid-callback-3/#post-11309272)
 * **Solution: **
    Add to theme `functions.php` file:
 * `add_filter( 'wpseo_remove_reply_to_com', '__return_false' );`
 * instead of
    `add_filter( 'wpseo_remove_reply_to_com', false );`
 * Related:
    [https://wordpress.org/support/topic/readers-cant-answer-comments/](https://wordpress.org/support/topic/readers-cant-answer-comments/)
   [https://wordpress.org/support/topic/replytocom-removal-breaks-wp-touch-pro-nested-comments/#post-10072157](https://wordpress.org/support/topic/replytocom-removal-breaks-wp-touch-pro-nested-comments/#post-10072157)
    -  This reply was modified 7 years, 2 months ago by [AiratTop](https://wordpress.org/support/users/airathalitov/).
 *  [Juliette Reinders Folmer](https://wordpress.org/support/users/jrf/)
 * (@jrf)
 * [7 years, 2 months ago](https://wordpress.org/support/topic/php-warning-call_user_func_array-expects-parameter-1-to-be-a-valid-callback-3/#post-11309291)
 * [@airathalitov](https://wordpress.org/support/users/airathalitov/) Could you 
   mark this topic as resolved please ?
 *  Thread Starter [AiratTop](https://wordpress.org/support/users/airathalitov/)
 * (@airathalitov)
 * [7 years, 2 months ago](https://wordpress.org/support/topic/php-warning-call_user_func_array-expects-parameter-1-to-be-a-valid-callback-3/#post-11309302)
 * Done
    Thanks!

Viewing 8 replies - 1 through 8 (of 8 total)

The topic ‘PHP Warning: call_user_func_array() expects parameter 1 to be a valid
callback’ is closed to new replies.

 * ![](https://ps.w.org/wordpress-seo/assets/icon-256x256.gif?rev=3419908)
 * [Yoast SEO - Advanced SEO with real-time guidance and built-in AI](https://wordpress.org/plugins/wordpress-seo/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wordpress-seo/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wordpress-seo/)
 * [Active Topics](https://wordpress.org/support/plugin/wordpress-seo/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wordpress-seo/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wordpress-seo/reviews/)

 * 8 replies
 * 3 participants
 * Last reply from: [AiratTop](https://wordpress.org/support/users/airathalitov/)
 * Last activity: [7 years, 2 months ago](https://wordpress.org/support/topic/php-warning-call_user_func_array-expects-parameter-1-to-be-a-valid-callback-3/#post-11309302)
 * Status: resolved