#31023 closed enhancement (duplicate)
avoid logging update requests error when WP_HTTP_BLOCK_EXTERNAL is set
| Reported by: | dpik | Owned by: | |
|---|---|---|---|
| Priority: | normal | Milestone: | |
| Component: | Administration | Version: | 4.2 |
| Severity: | normal | Keywords: | has-patch |
| Cc: | Focuses: |
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.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
wp-includes/update.php patch