Aparece Warning al actualizar una entrada
-
Hola,
Cuando actualizo una entrada, me aparece un warning en pantalla:
Warning: Invalid argument supplied for foreach() in /home/customer/www/monitorinformatica.com/public_html/wp-admin/includes/post.php on line 358
Warning: Cannot modify header information – headers already sent by (output started at /home/customer/www/monitorinformatica.com/public_html/wp-admin/includes/post.php:358) in /home/customer/www/monitorinformatica.com/public_html/wp-admin/post.php on line 231
El contenido de la entrada se actualiza correctamente. Pero me aparece el warning siempre.
Cual es el problema?
(Añado los dos bloques de código de los warnings)Warning: Invalid argument supplied for foreach() in /home/customer/www/monitorinformatica.com/public_html/wp-admin/includes/post.php on line 358:
// Meta stuff. if ( isset( $post_data['meta'] ) && $post_data['meta'] ) { foreach ( $post_data['meta'] as $key => $value ) { $meta = get_post_meta_by_id( $key ); if ( ! $meta ) { continue; } if ( $meta->post_id != $post_ID ) { continue; } if ( is_protected_meta( $meta->meta_key, 'post' ) || ! current_user_can( 'edit_post_meta', $post_ID, $meta->meta_key ) ) { continue; } if ( is_protected_meta( $value['key'], 'post' ) || ! current_user_can( 'edit_post_meta', $post_ID, $value['key'] ) ) { continue; } update_meta( $key, $value['key'], $value['value'] ); } }
Warning: Cannot modify header information – headers already sent by (output started at /home/customer/www/monitorinformatica.com/public_html/wp-admin/includes/post.php:358) in /home/customer/www/monitorinformatica.com/public_html/wp-admin/post.php on line 231:
// Session cookie flag that the post was saved. if ( isset( $_COOKIE['wp-saving-post'] ) && $_COOKIE['wp-saving-post'] === $post_id . '-check' ) { setcookie( 'wp-saving-post', $post_id . '-saved', time() + DAY_IN_SECONDS, ADMIN_COOKIE_PATH, COOKIE_DOMAIN, is_ssl() ); } redirect_post( $post_id ); // Send user on their way while we keep working. exit;
Saludos
La página con la que necesito ayuda: [accede para ver el enlace]
- El debate ‘Aparece Warning al actualizar una entrada’ está cerrado a nuevas respuestas.