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

Fix PHP 8.5 null array key creating a Dashboard Panel without layoutMode set

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/dashboard/layoutconfig/PhabricatorDashboardPanelRefList.php:16]
```

Closes T16431

Test Plan:
* PHP 8.5
* Go to http://phorge.localhost/dashboard/edit/form/default/
* Create a dashboard with "Layout" set to "Two Columns: 33%/66%"

Reviewers: O1 Blessed Committers, mainframe98

Reviewed By: O1 Blessed Committers, mainframe98

Subscribers: tobiaswiese, valerio.bozzolan, Matthew, Cigaryno

Maniphest Tasks: T16431

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

+1 -1
+1 -1
src/applications/dashboard/layoutconfig/PhabricatorDashboardPanelRefList.php
··· 13 13 14 14 $mode_map = PhabricatorDashboardLayoutMode::getAllLayoutModes(); 15 15 $mode_key = idx($config, 'layoutMode'); 16 - if (!isset($mode_map[$mode_key])) { 16 + if ($mode_key === null || !isset($mode_map[$mode_key])) { 17 17 $mode_key = head_key($mode_map); 18 18 } 19 19 $mode = $mode_map[$mode_key];