diff --git a/src/applications/transactions/view/PhabricatorApplicationTransactionView.php b/src/applications/transactions/view/PhabricatorApplicationTransactionView.php index d20e0a0554..16d3d0e174 100644 --- a/src/applications/transactions/view/PhabricatorApplicationTransactionView.php +++ b/src/applications/transactions/view/PhabricatorApplicationTransactionView.php @@ -200,14 +200,18 @@ class PhabricatorApplicationTransactionView extends AphrontView { $engine = $this->getOrBuildEngine(); $comment = $xaction->getComment(); - if ($xaction->hasComment()) { + if ($comment) { if ($comment->getIsDeleted()) { return phutil_tag( 'em', array(), pht('This comment has been deleted.')); - } else { + } else if ($xaction->hasComment()) { return $engine->getOutput($comment, $field); + } else { + // This is an empty, non-deleted comment. Usually this happens when + // rendering previews. + return null; } }