Making WordPress.org

Changeset 1797


Ignore:
Timestamp:
07/30/2015 09:43:23 PM (11 years ago)
Author:
iandunn
Message:

Official WordPress Events: Ignore timeout warnings.

Timeouts are relatively common and don't require any intervention to resolve, so the warnings are just cluttering the logs.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordpress.org/public_html/wp-content/plugins/official-wordpress-events/official-wordpress-events.php

    r1513 r1797  
    339339
    340340                                if ( is_wp_error( $response ) ) {
    341                                         $error = sprintf(
    342                                                 'Recieved WP_Error message: %s; Request was to %s; Arguments were: %s',
    343                                                 implode( ', ', $response->get_error_messages() ),
    344                                                 $url,
    345                                                 print_r( $args, true )
    346                                         );
     341                                        $error_messages = implode( ', ', $response->get_error_messages() );
     342
     343                                        if ( false === strpos( $error_messages, 'Operation timed out' ) ) {
     344                                                $error = sprintf(
     345                                                        'Recieved WP_Error message: %s; Request was to %s; Arguments were: %s',
     346                                                        $error_messages,
     347                                                        $url,
     348                                                        print_r( $args, true )
     349                                                );
     350                                        }
    347351                                } elseif ( 200 != $response['response']['code'] ) {
    348352                                        // trigger_error() has a message limit of 1024 bytes, so we truncate $response['body'] to make sure that $body doesn't get truncated.
Note: See TracChangeset for help on using the changeset viewer.