diff --git a/src/infrastructure/diff/engine/PhabricatorInlineCommentAdjustmentEngine.php b/src/infrastructure/diff/engine/PhabricatorInlineCommentAdjustmentEngine.php --- a/src/infrastructure/diff/engine/PhabricatorInlineCommentAdjustmentEngine.php +++ b/src/infrastructure/diff/engine/PhabricatorInlineCommentAdjustmentEngine.php @@ -143,7 +143,14 @@ // Find the smallest "new" changeset ID. We'll consider everything // larger than this to be "newer", and everything smaller to be "older". - $first_new_id = min(mpull($new, 'getID')); + + // (It's possible we have no changesets if the commit is empty.) + + if ($new) { + $first_new_id = min(mpull($new, 'getID')); + } else { + $first_new_id = null; + } $results = array(); foreach ($inlines as $inline) {