@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: Do not use null array keys for comment action dropdown groups

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

```
ERROR 8192: Using null as an array offset is deprecated, use an empty string instead at [/var/www/html/phorge/phorge/src/applications/transactions/view/PhabricatorApplicationTransactionCommentView.php:597]
```

Closes T16360

Test Plan: Visit a Maniphest task and a Differential revision (the latter has dropdown sub-items!), open the "Add Action..." dropdown, select actions.

Reviewers: O1 Blessed Committers, mainframe98

Reviewed By: O1 Blessed Committers, mainframe98

Subscribers: tobiaswiese, valerio.bozzolan, Matthew, Cigaryno

Maniphest Tasks: T16360

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

+1 -1
+1 -1
src/applications/transactions/view/PhabricatorApplicationTransactionCommentView.php
··· 593 593 // Merge options into groups. 594 594 $groups = array(); 595 595 foreach ($action_map as $key => $item) { 596 - $group_key = $item['groupKey']; 596 + $group_key = $item['groupKey'] ?? ''; 597 597 if (!isset($groups[$group_key])) { 598 598 $groups[$group_key] = array(); 599 599 }