@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 creating a Harbormaster Build Plan

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/harbormaster/plan/HarbormasterBuildPlanBehavior.php:130]
```
Closes T16430

Test Plan: On PHP 8.5, go to http://phorge.localhost/harbormaster/plan/edit/form/default/

Reviewers: O1 Blessed Committers, mainframe98

Reviewed By: O1 Blessed Committers, mainframe98

Subscribers: tobiaswiese, valerio.bozzolan, Matthew, Cigaryno

Maniphest Tasks: T16430

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

+1 -1
+1 -1
src/applications/harbormaster/plan/HarbormasterBuildPlanBehavior.php
··· 127 127 $storage_key = self::getStorageKeyForBehaviorKey($behavior_key); 128 128 129 129 $plan_value = $plan->getPlanProperty($storage_key); 130 - if (isset($this->options[$plan_value])) { 130 + if ($plan_value !== null && isset($this->options[$plan_value])) { 131 131 return $this->options[$plan_value]; 132 132 } 133 133