Ensure wp-mail doesn't issue a 500 error if no messages are available to post. Fixed #5420 props Bobcat
git-svn-id: https://develop.svn.wordpress.org/trunk@6357 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
e52d27014b
commit
d3be09a763
@ -14,9 +14,14 @@ $pop3 = new POP3();
|
||||
if (!$pop3->connect(get_option('mailserver_url'), get_option('mailserver_port')))
|
||||
wp_die($pop3->ERROR);
|
||||
|
||||
$count = $pop3->login(get_option('mailserver_login'), get_option('mailserver_pass'));
|
||||
if (0 == $count) wp_die(__('There doesn’t seem to be any new mail.'));
|
||||
if (!$pop3->user(get_option('mailserver_login')))
|
||||
wp_die($pop3->ERROR);
|
||||
|
||||
$count = $pop3->pass(get_option('mailserver_pass'));
|
||||
if (false === $count)
|
||||
wp_die($pop3->ERROR);
|
||||
if (0 == $count)
|
||||
echo "<p>There doesn't seem to be any new mail.</p>\n"; // will fall-through to end of for loop
|
||||
|
||||
for ($i=1; $i <= $count; $i++) :
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user