@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

PHP 8.5: Fix null array key in DifferentialParseRenderTestCase

Summary:
Setting null as an array key is deprecated since PHP 8.5 per https://www.php.net/releases/8.5/en.php: "Using null as an array offset or when calling array_key_exists() is now deprecated. Use an empty string instead."

See the same game nine lines lower.

Closes T16497

Test Plan: Run `./bin/arc unit ./src/applications/differential/__tests__/DifferentialParseRenderTestCase.php` on PHP 8.5

Reviewers: O1 Blessed Committers, mainframe98

Reviewed By: O1 Blessed Committers, mainframe98

Subscribers: tobiaswiese, valerio.bozzolan, Matthew, Cigaryno

Maniphest Tasks: T16497

Differential Revision: https://we.phorge.it/D26763

+1 -1
+1 -1
src/applications/differential/render/DifferentialChangesetRenderer.php
··· 531 531 } 532 532 } 533 533 534 - if (isset($hunk_starts[$ospec['line']])) { 534 + if ($ospec['line'] !== null && isset($hunk_starts[$ospec['line']])) { 535 535 $primitives[] = array( 536 536 'type' => 'no-context', 537 537 );