HomePhorge

Fix a MetaMTA array_combine() warning

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

Provenance
epriestleyAuthored on Jan 8 2013, 10:39 AM
themackabuPushed on Mar 25 2025, 8:07 PM
Parents
rPdf2c811a5489: Fix an error in DiffusionBrowseTableView with SVN repsositories with no lint…
Branches
Unknown
Tags
Unknown

Event Timeline