#31023 closed enhancement (duplicate)
avoid logging update requests error when WP_HTTP_BLOCK_EXTERNAL is set
Reported by: | dpik | Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | 4.2 |
Component: | Administration | Keywords: | has-patch |
Focuses: | Cc: |
Description
When WP_HTTP_BLOCK_EXTERNAL is set, error log is growing fast.
wp-includes/update.php unconditionally reports an error when the request failed:
trigger_error( __( 'An unexpected error occurred. Something may be wrong with WordPress.org or this server’s configuration. If you continue to have problems, please try the <a href="https://wordpress.org/support/">support forums</a>.' ) . ' ' . __( '(WordPress could not establish a secure connection to WordPress.org. Please contact your server administrator.)' ), headers_sent() || WP_DEBUG ? E_USER_WARNING : E_USER_NOTICE );
if user blocked external requests, I think it should not be logged.
I suggest we check if url is blocked before making the request and silently return if we can't. See diff file implementing this.
Attachments (1)
Change History (4)
Note: See
TracTickets for help on using
tickets.
wp-includes/update.php patch