Skip to content
Browse files

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

…3163.

git-svn-id: http://svn.automattic.com/wordpress/trunk@14518 1a063a9b-81f0-0310-95a4-ce76da25c4cd
  • Loading branch information...
1 parent 4deb7b8 commit 1d8718e03ddc1617fc28a9e4632a308da2cc9c85 nacin committed May 8, 2010
Showing with 11 additions and 6 deletions.
  1. +11 −6 wp-mail.php
View
17 wp-mail.php
@@ -35,13 +35,18 @@
$phone_delim = '::';
$pop3 = new POP3();
-$count = 0;
-if ( ! $pop3->connect(get_option('mailserver_url'), get_option('mailserver_port') ) ||
- ! $pop3->user(get_option('mailserver_login')) ||
- ( ! $count = $pop3->pass(get_option('mailserver_pass')) ) ) {
- $pop3->quit();
- wp_die( ( 0 === $count ) ? __('There doesn’t seem to be any new mail.') : esc_html($pop3->ERROR) );
+if ( !$pop3->connect( get_option('mailserver_url'), get_option('mailserver_port') ) || !$pop3->user( get_option('mailserver_login') ) )
+ wp_die( esc_html( $pop3->ERROR ) );
+
+$count = $pop3->pass( get_option('mailserver_pass') );
+
+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++ ) {

0 comments on commit 1d8718e

Please sign in to comment.
Something went wrong with that request. Please try again.