2017-01-23 126 views
1

我在我的WordPress网站上,这些重复消息在我的仪表板上弹出。我正在使用WordPress 4.7.1。我没有在我的网站上的FeedWordPress插件,因为我看到他们也有这个错误的问题。警告:call_user_func_array()期望参数1是一个有效的回调,没有数组或字符串

警告:call_user_func_array()预计参数1是一个有效的 回调,没有在 /home/mydomain/public_html/wp-includes/class-wp-hook.php给定线298

数组或字符串

警告:call_user_func_array()预计参数1是一个有效的 回调,没有在 /home/mydomain/public_html/wp-includes/class-wp-hook.php给定线阵列或串298

此线是298

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

这是包含线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; 
} 

这是一个严重的警告功能?如果是这样,我该如何解决这个问题?

+0

https://wordpress.org/support/topic/call_user_func_array-expects-parameter-1-to-be-valid-custom-function/和[跨站点重复数据删除](HTTP:// wordpress的。 stackexchange.com/questions/108860/error-call-user-func-array-expects-parameter-1-to-be-a-valid-callback) – Machavity

+0

我敢打赌问题是'add_filter'和任何地方你告诉WP称这个 – Machavity

+0

不幸的是,这个错误是误导。问题可能发生在列出的线路上,但是在其他地方触发 –

回答

0

只是为了更新这个线程 - 我有同样的错误升级到4.7.2。我停用了我的插件一个接一个,发现一个导致问题

+0

请发布插件名称以帮助其他用户。 –

0

你说你停用了一些插件并修复了它。什么插件是造成这个问题,因为我得到相同的东西

0

我有同样的问题。我禁用了Slider Revolution插件并修复了这个问题。

希望它有帮助!

0
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); 
相关问题