Make WordPress Core

Opened 9 years ago

Closed 9 years ago

Last modified 9 years ago

#31023 closed enhancement (duplicate)

avoid logging update requests error when WP_HTTP_BLOCK_EXTERNAL is set

Reported by: dpik's profile dpik Owned by:
Milestone: Priority: normal
Severity: normal Version: 4.2
Component: Administration Keywords: has-patch
Focuses: Cc:


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 or this server&#8217;s configuration. If you continue to have problems, please try the <a href="">support forums</a>.' ) . ' ' . __( '(WordPress could not establish a secure connection to 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)

31023.diff (2.3 KB) - added by dpik 9 years ago.
wp-includes/update.php patch

Download all attachments as: .zip

Change History (4)

9 years ago

wp-includes/update.php patch

#1 @dpik
9 years ago

  • Keywords has-patch added

#2 @jesin
9 years ago

  • Resolution set to duplicate
  • Status changed from new to closed

Duplicate of #29719.

#3 @DrewAPicture
9 years ago

  • Milestone Awaiting Review deleted
Note: See TracTickets for help on using tickets.