Changeset 6357

Show
Ignore:
Timestamp:
12/05/07 07:39:07 (1 year ago)
Author:
westi
Message:

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

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • 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++) :