@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: Fix an invalid null array key in PhabricatorSearchOrderField

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."

Do not try to look up an `orderAlias` if `ValueForControl` in parent `PhabricatorSearchField` is null anyway (`$value` is only set if `readValueFromSavedQuery()` gets called as that sets `$this->value = $this->didReadValueFromSavedQuery($value);`).

```
ERROR 8192: Using null as an array offset is deprecated, use an empty string instead at [/var/www/html/phorge/phorge/src/applications/search/field/PhabricatorSearchOrderField.php:39]
```

Closes T16358

Test Plan: Log in and go to http://phorge.localhost/maniphest/

Reviewers: O1 Blessed Committers, mainframe98

Reviewed By: O1 Blessed Committers, mainframe98

Subscribers: tobiaswiese, valerio.bozzolan, Matthew, Cigaryno

Maniphest Tasks: T16358

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

+1 -1
+1 -1
src/applications/search/field/PhabricatorSearchOrderField.php
··· 36 36 // If the SavedQuery has an alias for an order, map it to the canonical 37 37 // name for the order so the correct option is selected in the dropdown. 38 38 $value = parent::getValueForControl(); 39 - if (isset($this->orderAliases[$value])) { 39 + if ($value && isset($this->orderAliases[$value])) { 40 40 $value = $this->orderAliases[$value]; 41 41 } 42 42 return $value;