@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: Make getCanonicalValue() handle passed null values in PhabricatorSelectEditField

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/transactions/editfield/PhabricatorSelectEditField.php:64]
```

Closes T16366

Test Plan: Go to http://phorge.localhost/settings/panel/datetime/

Reviewers: O1 Blessed Committers, avivey

Reviewed By: O1 Blessed Committers, avivey

Subscribers: avivey, tobiaswiese, valerio.bozzolan, Matthew, Cigaryno

Maniphest Tasks: T16366

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

+1 -1
+1 -1
src/applications/transactions/editfield/PhabricatorSelectEditField.php
··· 61 61 62 62 private function getCanonicalValue($value) { 63 63 $options = $this->getOptions(); 64 - if (!isset($options[$value])) { 64 + if ($value !== null && !isset($options[$value])) { 65 65 $aliases = $this->getOptionAliases(); 66 66 if (isset($aliases[$value])) { 67 67 $value = $aliases[$value];