Ticket #5420 (closed enhancement: fixed)

Opened 1 year ago

Last modified 1 year ago

Better exit for wp-mail.php

Reported by: lexhair Assigned to: 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

wp-mail.diff (0.5 kB) - added by Bobcat on 12/04/07 17:22:15.
Don't return 500 error if no email
wp-mail.2.diff (0.8 kB) - added by Bobcat on 12/04/07 22:15:38.
Don't issue 500 error if no messages; Check for user/password failure

Change History

12/04/07 17:22:15 changed by Bobcat

  • attachment wp-mail.diff added.

Don't return 500 error if no email

12/04/07 17:23:52 changed by Bobcat

  • keywords set to has-patch tested.
  • milestone changed from 2.5 to 2.4.

12/04/07 17:58:21 changed by lexhair

Thank you!

12/04/07 21:35:15 changed by westi

  • owner changed from anonymous to westi.
  • status changed from new to assigned.

12/04/07 22:15:38 changed by Bobcat

  • attachment wp-mail.2.diff added.

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

12/04/07 22:20:11 changed by Bobcat

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

12/04/07 22:26:17 changed by Bobcat

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.

12/05/07 07:39:08 changed by westi

  • status changed from assigned to closed.
  • resolution set to fixed.

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