From ff98565db65e00b100cc90e6fc5eb7a660f0da5e Mon Sep 17 00:00:00 2001 From: epriestley Date: Tue, 1 Apr 2014 13:34:05 -0700 Subject: [PATCH] Fix an issue where email for "accepted" revisions would fatal Summary: When trying to render "BRANCH", we need the active diff. Load it in general since it seems reasonable for custom fields to expect it to exist during mail rendering. --- .../differential/editor/DifferentialTransactionEditor.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/applications/differential/editor/DifferentialTransactionEditor.php b/src/applications/differential/editor/DifferentialTransactionEditor.php index 9c5673059f..46b71bbe8f 100644 --- a/src/applications/differential/editor/DifferentialTransactionEditor.php +++ b/src/applications/differential/editor/DifferentialTransactionEditor.php @@ -587,6 +587,7 @@ final class DifferentialTransactionEditor $new_revision = id(new DifferentialRevisionQuery()) ->setViewer($this->getActor()) ->needReviewerStatus(true) + ->needActiveDiffs(true) ->withIDs(array($object->getID())) ->executeOne(); if (!$new_revision) { @@ -595,6 +596,7 @@ final class DifferentialTransactionEditor } $object->attachReviewerStatus($new_revision->getReviewerStatus()); + $object->attachActiveDiff($new_revision->getActiveDiff()); foreach ($xactions as $xaction) { switch ($xaction->getTransactionType()) {