@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

PHP 8.5: Avoid null array key in Conduit's audit.query

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/audit/conduit/AuditQueryConduitAPIMethod.php:86]
```

Closes T16435

Test Plan: On PHP 8.5, go to http://phorge.localhost/conduit/method/audit.query/ and click the "Call Method" button

Reviewers: O1 Blessed Committers, mainframe98

Reviewed By: O1 Blessed Committers, mainframe98

Subscribers: tobiaswiese, valerio.bozzolan, Matthew, Cigaryno

Maniphest Tasks: T16435

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

+1 -1
+1 -1
src/applications/audit/conduit/AuditQueryConduitAPIMethod.php
··· 83 83 ); 84 84 85 85 $status = $request->getValue('status'); 86 - if (isset($status_map[$status])) { 86 + if ($status !== null && isset($status_map[$status])) { 87 87 $query->withStatuses($status_map[$status]); 88 88 } 89 89