HomePhabricator

(stable) Add a missing "null" check when rebuilding old/new diff content

Description

(stable) Add a missing "null" check when rebuilding old/new diff content

Summary:
See https://discourse.phabricator-community.org/t/exceptions-when-viewing-diffs/3787. This list may include null values.

Until PHP 7.4, $x = null; echo $x['y']; does not emit a warning. Sneaky!

Test Plan:

  • Traced null values from reparseHunksForSpecialAttributes(), saw them no longer incorporated into corpus bodies.
  • This has some amount of test coverage.

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

Details