From bf21c6ee247c2af2da9ababd7f2983b5671940a9 Mon Sep 17 00:00:00 2001 From: Andre Klapper Date: Tue, 17 Feb 2026 20:08:56 +0100 Subject: [PATCH] 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 --- .../project/engine/PhabricatorProjectEditEngine.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/applications/project/engine/PhabricatorProjectEditEngine.php b/src/applications/project/engine/PhabricatorProjectEditEngine.php index 942ef8f404..ef81c2d67d 100644 --- a/src/applications/project/engine/PhabricatorProjectEditEngine.php +++ b/src/applications/project/engine/PhabricatorProjectEditEngine.php @@ -125,7 +125,7 @@ final class PhabricatorProjectEditEngine if ($is_milestone) { foreach ($fields as $key => $field) { $xaction_type = $field->getTransactionType(); - if (isset($unavailable[$xaction_type])) { + if ($xaction_type !== null && isset($unavailable[$xaction_type])) { unset($fields[$key]); } } -- 2.51.2