1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-10 00:42:41 +01:00

Fix an issue with error handling when no mailers are available

Summary:
Ref T13164. See PHI785. See D19546. I think I didn't test the updated error messaging here entirely properly, since I have some tasks in queue which error out here ("Missing argument 1 to newMailers(...)").

This is an error condition already, but we want to get through this call so we can raise a tailored message.

Test Plan: Tasks which errored out here now succeed. This condition is only reachable if you misconfigure things in the first place.

Reviewers: amckinley

Reviewed By: amckinley

Maniphest Tasks: T13164

Differential Revision: https://secure.phabricator.com/D19572
This commit is contained in:
epriestley 2018-08-13 09:25:41 -07:00
parent e5906f4e12
commit b86dae6214

View file

@ -621,7 +621,7 @@ final class PhabricatorMetaMTAMail
public function sendWithMailers(array $mailers) {
if (!$mailers) {
$any_mailers = self::newMailers();
$any_mailers = self::newMailers(array());
// NOTE: We can end up here with some custom list of "$mailers", like
// from a unit test. In that case, this message could be misleading. We