From 99d972fc8187cdae61b5f5ddc04d6cfe50508e21 Mon Sep 17 00:00:00 2001 From: epriestley Date: Fri, 25 Sep 2015 15:00:55 -0700 Subject: [PATCH] Fix Herald rule actions on empty custom PHID fields Summary: Fixes T9260. That task has a good description of the issue. Test Plan: Followed steps in T9260 to reproduce the issue. Applied patch; issue went away. Reviewers: chad Reviewed By: chad Maniphest Tasks: T9260 Differential Revision: https://secure.phabricator.com/D14169 --- .../standard/PhabricatorStandardCustomFieldPHIDs.php | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/infrastructure/customfield/standard/PhabricatorStandardCustomFieldPHIDs.php b/src/infrastructure/customfield/standard/PhabricatorStandardCustomFieldPHIDs.php index 842d662904..d900d41eb3 100644 --- a/src/infrastructure/customfield/standard/PhabricatorStandardCustomFieldPHIDs.php +++ b/src/infrastructure/customfield/standard/PhabricatorStandardCustomFieldPHIDs.php @@ -166,4 +166,14 @@ abstract class PhabricatorStandardCustomFieldPHIDs ); } + public function getHeraldFieldValue() { + // If the field has a `null` value, make sure we hand an `array()` to + // Herald. + $value = parent::getHeraldFieldValue(); + if ($value) { + return $value; + } + return array(); + } + }