mirror of
https://github.com/WordPress/WordPress.git
synced 2025-01-03 06:57:35 +01:00
Ensure wp-mail doesn't issue a 500 error if no messages are available to post. Fixed #5420 props Bobcat
git-svn-id: http://svn.automattic.com/wordpress/trunk@6357 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
63c48d25b9
commit
80f85b53e3
@ -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