Page MenuHomePhabricator

Add a missing "null" check when rebuilding old/new diff content
ClosedPublic

Authored by epriestley on Apr 25 2020, 4:21 PM.
Tags
None
Referenced Files
F18891034: D21169.id.diff
Fri, Nov 7, 10:11 AM
F18831955: D21169.id.diff
Oct 25 2025, 5:40 PM
F18829068: D21169.diff
Oct 24 2025, 7:36 PM
F18798553: D21169.id50405.diff
Oct 17 2025, 6:48 AM
F18773499: D21169.id50404.diff
Oct 9 2025, 10:24 AM
F18761015: D21169.diff
Oct 6 2025, 11:55 AM
F18673256: D21169.id50405.diff
Sep 25 2025, 9:54 AM
F18672379: D21169.id50404.diff
Sep 25 2025, 7:25 AM
Subscribers
None

Details

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.

Diff Detail

Repository
rP Phabricator
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

This revision was not accepted when it landed; it landed in state Needs Review.Apr 25 2020, 4:22 PM
epriestley requested review of this revision.
This revision was automatically updated to reflect the committed changes.