Make WordPress Core

Changeset 6357


Ignore:
Timestamp:
12/05/2007 07:39:07 AM (17 years ago)
Author:
westi
Message:

Ensure wp-mail doesn't issue a 500 error if no messages are available to post. Fixed #5420 props Bobcat

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-mail.php

    r6349 r6357  
    1515    wp_die($pop3->ERROR);
    1616
    17 $count = $pop3->login(get_option('mailserver_login'), get_option('mailserver_pass'));
    18 if (0 == $count) wp_die(__('There doesn’t seem to be any new mail.'));
    19 
     17if (!$pop3->user(get_option('mailserver_login')))
     18    wp_die($pop3->ERROR);
     19
     20$count = $pop3->pass(get_option('mailserver_pass'));
     21if (false === $count)
     22    wp_die($pop3->ERROR);
     23if (0 == $count)
     24    echo "<p>There doesn't seem to be any new mail.</p>\n"; // will fall-through to end of for loop
    2025
    2126for ($i=1; $i <= $count; $i++) :
Note: See TracChangeset for help on using the changeset viewer.