我在我的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;
}
這是一個嚴重的警告功能?如果是這樣,我該如何解決這個問題?
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
我敢打賭問題是'add_filter'和任何地方你告訴WP稱這個 – Machavity
不幸的是,這個錯誤是誤導。問題可能發生在列出的線路上,但是在其他地方觸發 –