Um usuário perguntou
Olá!
Depois de atualizar o Yoast SEO para v10.0, vejo muitos desses avisos nos registros:
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
Código:
// 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 e 5.1.1 PHP 7.2.16-1 + ubuntu16.04.1 + deb.sury.org + 1
(@stodorovic)
1 ano, 8 meses atrás
Sim, se não se aplicar (que é um saque para add_filter ou https://developer.wordpress.org/reference/functions/add_action/).
Você deve tentar esvaziar o OPcache e é útil habilitar o Xdebug (ou outra solução) para obter uma faixa de depuração (você verá qual filtro está envolvido).
(@airathalitov)
1 ano, 8 meses atrás
Eu não uso OPcache.
Aqui estão minhas configurações de modo WP_DEBUG:
/** 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 );
}
Mas não vejo nenhum traço de empilhamento lá. Apenas esta linha:
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
(@stodorovic)
1 ano, 8 meses atrás
Essa essência explicará como ativar o fundo em seu site: https://gist.github.com/jrfnl/5925642
(@airathalitov)
1 ano, 8 meses atrás
Como eu disse aqui se plugin (Yoast SEO) em Backtrace:wordpress-seo
[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()
(@airathalitov)
1 ano, 8 meses atrás
https://github.com/Yoast/wordpress-seo/issues/12425
(@airathalitov)
1 ano, 8 meses atrás
Solução:
Adicionar ao arquivo temático:functions.php
add_filter( 'wpseo_remove_reply_to_com', '__return_false' );
em vez de
add_filter( 'wpseo_remove_reply_to_com', false );
Relacionados: https://wordpress.org/support/topic/readers-cant-answer-comments/ https://wordpress.org/support/topic/replytocom-removal-breaks-wp-touch-pro-nested-comments/ #iar-10072157
Essa resposta foi modificada há 1 ano, há 8 meses.
(@jrf)
1 ano, 8 meses atrás
@airathalitov Poderia marcar esse problema como uma solução?
(@airathalitov)
1 ano, 8 meses atrás
Feito, obrigado!
Resolveu seu problema?
0/0
Isto foi útil?
0 / 0