@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: Fix null array key creating a milestone in PhabricatorProjectEditEngine

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/project/engine/PhabricatorProjectEditEngine.php:128]
```

Closes T16504

Test Plan:
* PHP 8.5
* Go to an existing parent project
* Select "Subprojects" in the sidebar
* Click "Create Milestone" on the right

Reviewers: O1 Blessed Committers, mainframe98

Reviewed By: O1 Blessed Committers, mainframe98

Subscribers: tobiaswiese, valerio.bozzolan, Matthew, Cigaryno

Maniphest Tasks: T16504

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

+1 -1
+1 -1
src/applications/project/engine/PhabricatorProjectEditEngine.php
··· 125 125 if ($is_milestone) { 126 126 foreach ($fields as $key => $field) { 127 127 $xaction_type = $field->getTransactionType(); 128 - if (isset($unavailable[$xaction_type])) { 128 + if ($xaction_type !== null && isset($unavailable[$xaction_type])) { 129 129 unset($fields[$key]); 130 130 } 131 131 }