@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 Passphrase Credential without type

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

```
[2026-01-06 23:02:59] ERROR 8192: Using null as an array offset is deprecated, use an empty string instead at [/var/www/html/phorge/phorge/src/applications/passphrase/controller/PassphraseCredentialCreateController.php:17]
```

Closes T16447

Test Plan: On PHP 8.5, go to http://phorge.localhost/passphrase/create/ and press "Continue" without selecting a credential type.

Reviewers: O1 Blessed Committers, valerio.bozzolan

Reviewed By: O1 Blessed Committers, valerio.bozzolan

Subscribers: tobiaswiese, valerio.bozzolan, Matthew, Cigaryno

Maniphest Tasks: T16447

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

+1 -1
+1 -1
src/applications/passphrase/controller/PassphraseCredentialCreateController.php
··· 14 14 15 15 if ($request->isFormPost()) { 16 16 $type = $request->getStr('type'); 17 - if (empty($types[$type])) { 17 + if ($type === null || empty($types[$type])) { 18 18 $errors[] = pht('You must choose a credential type.'); 19 19 $e_type = pht('Required'); 20 20 }