Avisos
Vaciar todo

Hosting WordPress 70% dto Dominios promo

Errores con class-wp-hook.php  

 
Pau
 Pau
Usuario activo

Hola, hace unos días me llegó un mensaje de que mi cuenta había superado su capacidad de espacio en disco. La culpa era de un archivo error_log en pubic_html que ocupaba más de 500MB. Lo borré, pero desde entonces no dejo de tener problemas con el consumo de recursos en mi web. Y es curioso, porque he reducido a la mitad las llamadas a Ajax y he duplicado la capacidad del hosting.

La cuestión es que el 90% de esos errores provienen de class-wp-hook.php y son esta recurrencia:

[29-Jul-2019 20:08:38 UTC] PHP Warning: current() expects parameter 1 to be array, null given in /home2/blogdelb/public_html/wp-includes/class-wp-hook.php on line 275
[29-Jul-2019 20:08:38 UTC] PHP Warning: Invalid argument supplied for foreach() in /home2/blogdelb/public_html/wp-includes/class-wp-hook.php on line 277
[29-Jul-2019 20:08:38 UTC] PHP Warning: next() expects parameter 1 to be array, null given in /home2/blogdelb/public_html/wp-includes/class-wp-hook.php on line 291

En esas líneas del fichero hay esto:

/**
* Calls the callback functions added to a filter hook.
*
* @since 4.7.0
*
* @param mixed $value The value to filter.
* @param array $args Arguments to pass to callbacks.
* @return mixed The filtered value after all hooked functions are applied to it.
*/
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;
}

Apenas tengo conocimientos técnicos y no sé a qué se debe. Tengo la última versión de Wordpress, y el tema y los plugins están actualizados.

Agradeceré mucho cualquier ayuda, muchas gracias

URL del sitio: Contenido solo visible a usuarios registrados

Citar
Respondido : 02/08/2019 12:43 pm
Pepe
 Pepe
Soporte CMS Webempresa Admin

Hola Pau.

Veo que tienes problemas con algunos plugins:

[02-Aug-2019 08:36:54 UTC] PHP Warning: in_array() expects parameter 2 to be array, boolean given in /home2/blogdelb/public_html/wp-content/plugins/kk-star-ratings/index.php on line 525
[02-Aug-2019 08:39:08 UTC] PHP Fatal error: Out of memory (allocated 6291456) (tried to allocate 72 bytes) in /home2/blogdelb/public_html/wp-content/plugins/ad-inserter/class.php on line 620
[02-Aug-2019 08:35:43 UTC] PHP Fatal error: Out of memory (allocated 28049408) (tried to allocate 3072 bytes) in /home2/blogdelb/public_html/wp-content/plugins/wordpress-seo/admin/notifiers/class-post-type-archive-notification-handler.php on line 95
[02-Aug-2019 08:35:43 UTC] PHP Fatal error: Out of memory (allocated 50069504) (tried to allocate 786432 bytes) in /home2/blogdelb/public_html/wp-content/plugins/easy-social-share-buttons3/lib/admin/settings/essb-structure5-where.php on line 506

estos errores hacen referencia los plugins kk star ratings, ad-inserte, wordpress seo y easy-social-share-buttons3

Veo que utilizas la última versión de WordPress con la versión 5.6 de PHP.
.- Accede a tu cuenta de cPanel y modifica la versión de PHP para ese dominio, instala la versión 7.3

Puedes modificar la versión de PHP facilmente desde tu cuenta de cPanel -> Software -> Configurar PHP, solo tienes que seleccionar el dominio y la versión que quieres que se instale.

Tienes una Guia en este enlace:
-> https://guias.webempresa.com/preguntas-frecuentes/cambiar-la-version-php/

Una vez realizada la actualización de PHP accede al administrador de archivos y vacía el archivo error.log

Revisa si después de ese paso mejora.

Un saludo

ResponderCitar
Respondido : 02/08/2019 1:23 pm

Cursos Gratuitos WordPress

Pau
 Pau
Usuario activo

Gracias Pepe, voy a probar e informo por aquí 🙂

ResponderCitar
Respondido : 02/08/2019 1:31 pm