@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 null array key when configuring Favorites menu

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/search/engine/PhabricatorProfileMenuEngine.php:212]
```

Closes T16407

Test Plan: On PHP 8.5, go to http://phorge.localhost/favorites/menu/configure/

Reviewers: O1 Blessed Committers, mainframe98

Reviewed By: O1 Blessed Committers, mainframe98

Subscribers: tobiaswiese, valerio.bozzolan, Matthew, Cigaryno

Maniphest Tasks: T16407

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

+1 -1
+1 -1
src/applications/search/engine/PhabricatorProfileMenuEngine.php
··· 209 209 $available_modes = $this->getViewerEditModes(); 210 210 if ($available_modes) { 211 211 $available_modes = array_fuse($available_modes); 212 - if (isset($available_modes[$edit_mode])) { 212 + if ($edit_mode !== null && isset($available_modes[$edit_mode])) { 213 213 $this->editMode = $edit_mode; 214 214 } else { 215 215 if ($item_action != 'configure') {