WordPress.org

Make WordPress Core

Changeset 14518


Ignore:
Timestamp:
05/08/2010 07:34:59 PM (11 years ago)
Author:
nacin
Message:

Adjust POP3 error checks in wp-mail.php. props solarissmoke, fixes #13163.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-mail.php

    r14070 r14518  
    3636
    3737$pop3 = new POP3();
    38 $count = 0;
    39 
    40 if ( ! $pop3->connect(get_option('mailserver_url'), get_option('mailserver_port') ) ||
    41     ! $pop3->user(get_option('mailserver_login')) ||
    42     ( ! $count = $pop3->pass(get_option('mailserver_pass')) ) ) {
    43         $pop3->quit();
    44         wp_die( ( 0 === $count ) ? __('There doesn’t seem to be any new mail.') : esc_html($pop3->ERROR) );
     38
     39if ( !$pop3->connect( get_option('mailserver_url'), get_option('mailserver_port') ) || !$pop3->user( get_option('mailserver_login') ) )
     40    wp_die( esc_html( $pop3->ERROR ) );
     41
     42$count = $pop3->pass( get_option('mailserver_pass') );
     43
     44if( false === $count )
     45    wp_die( esc_html( $pop3->ERROR ) );
     46   
     47if( 0 === $count ) {
     48    $pop3->quit();
     49    wp_die( __('There doesn’t seem to be any new mail.') );
    4550}
    4651
Note: See TracChangeset for help on using the changeset viewer.