HomePhabricator

Fix an invalid index access for synthetic lint inline comments from Harbormaster

Description

Fix an invalid index access for synthetic lint inline comments from Harbormaster

Summary:
Ref T13524. If a Harbormaster lint message has no line number (which is permitted), we try to access an invalid index here. This is an exception after D21044.

Treat comments with no line number as unchanged. These comments do not have "ghost" behavior and do not port across diffs.

Test Plan:

  • Used "harbormaster.sendmessage" to submit lint with no line number on a changeset.
  • Viewed changeset.
    • Before patch: "Undefined index: <null>" error.
    • After patch: Clean changeset with lint message.

Screen Shot 2020-04-27 at 2.17.38 PM.png (236×856 px, 18 KB)

Maniphest Tasks: T13524

Differential Revision: https://secure.phabricator.com/D21178