Opened 5 years ago

Closed 5 years ago

#5420 closed enhancement (fixed)

Better exit for wp-mail.php

Reported by: lexhair Owned by: westi
Priority: normal Milestone: 2.5
Component: General Version: 2.3.1
Severity: minor Keywords: has-patch tested
Cc:

Description

Executing wp-mail.php when the POP3 mailbox is empty results in wp_die() and a 500 error. When you run wp-mail.php from the cron tab, it logs the 500 error.

I don't believe it should return an error in this case. The script runs as it should and just doesn't find any data to manipulate like a zero row query. Perhaps a more graceful exit could be considered. Thank you.

Attachments (2)

wp-mail.diff (556 bytes) - added by Bobcat 5 years ago.
Don't return 500 error if no email
wp-mail.2.diff (796 bytes) - added by Bobcat 5 years ago.
Don't issue 500 error if no messages; Check for user/password failure

Download all attachments as: .zip

Change History (8)

Bobcat5 years ago

Don't return 500 error if no email

  • Keywords has-patch tested added
  • Milestone changed from 2.5 to 2.4

Thank you!

  • Owner changed from anonymous to westi
  • Status changed from new to assigned

Bobcat5 years ago

Don't issue 500 error if no messages; Check for user/password failure

A user/password failure would look just like there were no messages. New patch checks user/password status and fails with 500 error if either failed. If login is successful and there are no messages, just the 'no messages' message is displayed (no 500 error).

Tested with WP 2.3.1, FreeBSD 6.2-RELEASE-p1, MySQL 4.1.20, with invalid username, invalid password, valid user/pass but no messages, valid user/pass with messages. Works correctly.

  • Resolution set to fixed
  • Status changed from assigned to closed

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

Note: See TracTickets for help on using tickets.