From 2309ee425cc19204a0434f9e4144cc8045f69c14 Mon Sep 17 00:00:00 2001 From: Andre Klapper Date: Thu, 26 Feb 2026 22:26:16 +0100 Subject: [PATCH] PHP 8.5: Fix null array key creating a Nuance Source 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/nuance/controller/NuanceSourceEditController.php:18] ``` Closes T16531 Test Plan: * PHP 8.5 * `./bin/config set phabricator.show-prototypes true` * Go to http://phorge.localhost/nuance/source/edit/form/default/ Reviewers: O1 Blessed Committers, valerio.bozzolan Reviewed By: O1 Blessed Committers, valerio.bozzolan Subscribers: tobiaswiese, valerio.bozzolan, Matthew, Cigaryno Maniphest Tasks: T16531 Differential Revision: https://we.phorge.it/D26806 --- .../nuance/controller/NuanceSourceEditController.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/applications/nuance/controller/NuanceSourceEditController.php b/src/applications/nuance/controller/NuanceSourceEditController.php index 76025b2eb9..6f4fd0b37e 100644 --- a/src/applications/nuance/controller/NuanceSourceEditController.php +++ b/src/applications/nuance/controller/NuanceSourceEditController.php @@ -15,7 +15,7 @@ final class NuanceSourceEditController $cancel_uri = $this->getApplicationURI('source/'); $map = NuanceSourceDefinition::getAllDefinitions(); $source_type = $request->getStr('sourceType'); - if (!isset($map[$source_type])) { + if (!$source_type || !isset($map[$source_type])) { return $this->buildSourceTypeResponse($cancel_uri); } -- 2.51.2