Adjust POP3 error checks in wp-mail.php. props solarissmoke, fixes #13163.
git-svn-id: https://develop.svn.wordpress.org/trunk@14518 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
f04386cca0
commit
00ae9bee64
17
wp-mail.php
17
wp-mail.php
@ -35,13 +35,18 @@ $time_difference = get_option('gmt_offset') * 3600;
|
|||||||
$phone_delim = '::';
|
$phone_delim = '::';
|
||||||
|
|
||||||
$pop3 = new POP3();
|
$pop3 = new POP3();
|
||||||
$count = 0;
|
|
||||||
|
|
||||||
if ( ! $pop3->connect(get_option('mailserver_url'), get_option('mailserver_port') ) ||
|
if ( !$pop3->connect( get_option('mailserver_url'), get_option('mailserver_port') ) || !$pop3->user( get_option('mailserver_login') ) )
|
||||||
! $pop3->user(get_option('mailserver_login')) ||
|
wp_die( esc_html( $pop3->ERROR ) );
|
||||||
( ! $count = $pop3->pass(get_option('mailserver_pass')) ) ) {
|
|
||||||
$pop3->quit();
|
$count = $pop3->pass( get_option('mailserver_pass') );
|
||||||
wp_die( ( 0 === $count ) ? __('There doesn’t seem to be any new mail.') : esc_html($pop3->ERROR) );
|
|
||||||
|
if( false === $count )
|
||||||
|
wp_die( esc_html( $pop3->ERROR ) );
|
||||||
|
|
||||||
|
if( 0 === $count ) {
|
||||||
|
$pop3->quit();
|
||||||
|
wp_die( __('There doesn’t seem to be any new mail.') );
|
||||||
}
|
}
|
||||||
|
|
||||||
for ( $i = 1; $i <= $count; $i++ ) {
|
for ( $i = 1; $i <= $count; $i++ ) {
|
||||||
|
Loading…
Reference in New Issue
Block a user