[wp-trac] [WordPress Trac] #31023: avoid logging update requests error when WP_HTTP_BLOCK_EXTERNAL is set
WordPress Trac
noreply at wordpress.org
Thu Jan 15 10:24:04 UTC 2015
#31023: avoid logging update requests error when WP_HTTP_BLOCK_EXTERNAL is set
----------------------------+-----------------------------
Reporter: dpik | Owner:
Type: enhancement | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Administration | Version: trunk
Severity: normal | Keywords:
Focuses: |
----------------------------+-----------------------------
When WP_HTTP_BLOCK_EXTERNAL is set, error log is growing fast.
wp-includes/update.php unconditionally reports an error when the request
failed:
{{{#!php
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.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/31023>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list