@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.

PHP 8.5: Avoid PhpStan warning about possible null array key in PhabricatorApplicationTransactionView

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."

Test Plan:
Run static code analysis:
```
/src/applications/transactions/view/PhabricatorApplicationTransactionView.php:372 Possibly invalid array key type int|string|null.
```

Reviewers: O1 Blessed Committers, valerio.bozzolan

Reviewed By: O1 Blessed Committers, valerio.bozzolan

Subscribers: mainframe98, tobiaswiese, valerio.bozzolan, Matthew, Cigaryno

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

+1 -1
+1 -1
src/applications/transactions/view/PhabricatorApplicationTransactionView.php
··· 365 365 366 366 private function groupRelatedTransactions(array $xactions) { 367 367 $last = null; 368 - $last_key = null; 368 + $last_key = ''; 369 369 $groups = array(); 370 370 foreach ($xactions as $key => $xaction) { 371 371 if ($last && $this->shouldGroupTransactions($last, $xaction)) {