#55304 closed enhancement (invalid)
Remove error logging in sanitize_post
Reported by: | legalweb | Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | 5.9.1 |
Component: | Posts, Post Types | Keywords: | |
Focuses: | Cc: |
Description
There is a error_log call in the method sanitize_post in post.php which is not needed in generall. it only spams the debug.log file
<?php foreach ( array_keys( get_object_vars( $post ) ) as $field ) { error_log("sanitize_post_field(field: ".$field.", postId:".$post->ID.")"); $post->$field = sanitize_post_field( $field, $post->$field, $post->ID, $context ); }
Change History (2)
Note: See
TracTickets for help on using
tickets.
Hi there, welcome to WordPress Trac!
Could it be that this file was manually edited on your site?
This function does not include any
error_log()
call in WordPress.See https://github.com/WordPress/wordpress-develop/blob/b28dcfd83243459e9cc08f46f70418ebfde9dde8/src/wp-includes/post.php#L2711-L2723