@recaptime-dev's working patches + fork for Phorge, a community fork of Phabricator. (Upstream dev and stable branches are at upstream/main and upstream/stable respectively.) hq.recaptime.dev/wiki/Phorge
phorge phabricator
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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

+5
+5
src/applications/differential/parser/DifferentialHunkParser.php
··· 456 456 457 457 $corpus = array(); 458 458 foreach ($lines as $l) { 459 + if ($l === null) { 460 + $corpus[] = "\n"; 461 + continue; 462 + } 463 + 459 464 if ($l['type'] != '\\') { 460 465 if ($l['text'] === null) { 461 466 // There's no text on this side of the diff, but insert a placeholder