Make WordPress Core

Opened 17 years ago

Closed 17 years ago

Last modified 7 years ago

#5420 closed enhancement (fixed)

Better exit for wp-mail.php

Reported by: lexhair's profile lexhair Owned by: westi's profile westi
Milestone: 2.5 Priority: normal
Severity: minor Version: 2.3.1
Component: General Keywords: has-patch tested
Focuses: 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 17 years ago.
Don't return 500 error if no email
wp-mail.2.diff (796 bytes) - added by Bobcat 17 years ago.
Don't issue 500 error if no messages; Check for user/password failure

Download all attachments as: .zip

Change History (9)

@Bobcat
17 years ago

Don't return 500 error if no email

#1 @Bobcat
17 years ago

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

#2 @lexhair
17 years ago

Thank you!

#3 @westi
17 years ago

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

@Bobcat
17 years ago

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

#4 @Bobcat
17 years ago

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).

#5 @Bobcat
17 years ago

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.

#6 @westi
17 years ago

  • 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

This ticket was mentioned in Slack in #accessibility by nic.bertino. View the logs.


7 years ago

Note: See TracTickets for help on using tickets.