From 1d9c6adf070d570647810eac9311109c933bfbe9 Mon Sep 17 00:00:00 2001 From: Andre Klapper Date: Sat, 3 Jan 2026 19:01:46 +0100 Subject: [PATCH] Fix PHP 8.5 null array key in "Add Dashboard to Favorites Menu" dialog without workflowKey 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/controller/dashboard/PhabricatorDashboardInstallController.php:35] ``` Closes T16432 Test Plan: * PHP 8.5 * Go to http://phorge.localhost/dashboard/view/1/ * Select "Add Dashboard to Menu" * Select "Add to Favorites Menu" * Get the "Add Dashboard to Favorites Menu" overlay menu Reviewers: O1 Blessed Committers, mainframe98 Reviewed By: O1 Blessed Committers, mainframe98 Subscribers: tobiaswiese, valerio.bozzolan, Matthew, Cigaryno Maniphest Tasks: T16432 Differential Revision: https://we.phorge.it/D26652 --- .../dashboard/PhabricatorDashboardInstallController.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/applications/dashboard/controller/dashboard/PhabricatorDashboardInstallController.php b/src/applications/dashboard/controller/dashboard/PhabricatorDashboardInstallController.php index 417086b405..850e89b51b 100644 --- a/src/applications/dashboard/controller/dashboard/PhabricatorDashboardInstallController.php +++ b/src/applications/dashboard/controller/dashboard/PhabricatorDashboardInstallController.php @@ -32,7 +32,7 @@ final class PhabricatorDashboardInstallController $workflow_key = $request->getURIData('workflowKey'); $workflows = PhabricatorDashboardInstallWorkflow::getAllWorkflows(); - if (!isset($workflows[$workflow_key])) { + if ($workflow_key === null || !isset($workflows[$workflow_key])) { return $this->newWorkflowDialog($dashboard, $workflows); } -- 2.51.2