Homec4science

Fix a MetaMTA array_combine() warning

Authored by epriestley <git@epriestley.com> on Jan 8 2013, 19:39.

Description

Fix a MetaMTA array_combine() warning

Summary:
Fixes T2290. Older versions of PHP (prior to PHP 5.4) raised a warning if you tried to combine empty arrays. (Newer versions don't, which is why I missed this in testing, although I may also not have tried sending empty mail.)

If mail has no recipients, we reach this with an empty array. Just skip the function body and return immediately, the result is empty array.

(You can get mail with no recipients in various valid ways, currently by, e.g., commenting on a Macro with no subscribers.)

Test Plan: Sent mail with zero, nonzero recipients. Received the nonzero recipient mail. Verified on php.net that this is a version issue.

Reviewers: codeblock, btrahan

Reviewed By: codeblock

CC: aran

Maniphest Tasks: T2290

Differential Revision: https://secure.phabricator.com/D4360

Details

Committed
epriestley <git@epriestley.com>Jan 8 2013, 19:39
Pushed
aubortJan 31 2017, 17:16
Parents
rPHdf2c811a5489: Fix an error in DiffusionBrowseTableView with SVN repsositories with no lint…
Branches
Unknown
Tags
Unknown

Event Timeline

epriestley <git@epriestley.com> committed rPH7752717125de: Fix a MetaMTA array_combine() warning (authored by epriestley <git@epriestley.com>).Jan 8 2013, 19:39