From 345340005b0301b495aa9e431ec4f8c9534be1a3 Mon Sep 17 00:00:00 2001 From: Nick Harper Date: Thu, 15 Mar 2012 00:30:19 -0700 Subject: [PATCH] Don't put bad mailing list names in the CC list of a commit message Summary: If we can't look up the name for a mailing list, don't put 'Unknown Mailing List' in the commit message - it will confuse things later down the road. Surely there is a better way of doing this than checking the name of the handle for the mailing list. Test Plan: called differential.getcommitmessage on a revision that had an invalid mailing list phid. Reviewers: epriestley, schrockn, jungejason Reviewed By: epriestley CC: aran, epriestley Differential Revision: https://secure.phabricator.com/D1910 --- .../specification/ccs/DifferentialCCsFieldSpecification.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/applications/differential/field/specification/ccs/DifferentialCCsFieldSpecification.php b/src/applications/differential/field/specification/ccs/DifferentialCCsFieldSpecification.php index 4ee59b9dc2..44c3000345 100644 --- a/src/applications/differential/field/specification/ccs/DifferentialCCsFieldSpecification.php +++ b/src/applications/differential/field/specification/ccs/DifferentialCCsFieldSpecification.php @@ -114,7 +114,10 @@ final class DifferentialCCsFieldSpecification $names = array(); foreach ($this->ccs as $phid) { - $names[] = $this->getHandle($phid)->getName(); + $handle = $this->getHandle($phid); + if ($handle->isComplete()) { + $names[] = $handle->getName(); + } } return implode(', ', $names); }