@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 potential null array key in PhabricatorRepositoryPullLocalDaemon

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

Test Plan:
Run static code analysis:
```
/src/applications/repository/daemon/PhabricatorRepositoryPullLocalDaemon.php:269 Possibly invalid array key type int|string|null.
```

Reviewers: O1 Blessed Committers, valerio.bozzolan, mainframe98

Reviewed By: O1 Blessed Committers, mainframe98

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

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

+6 -4
+6 -4
src/applications/repository/daemon/PhabricatorRepositoryPullLocalDaemon.php
··· 266 266 } 267 267 } 268 268 269 - $retry_after[$repository_id] = $this->resolveUpdateFuture( 270 - $pullable[$repository_id], 271 - $future, 272 - $min_sleep); 269 + if ($repository_id !== null) { 270 + $retry_after[$repository_id] = $this->resolveUpdateFuture( 271 + $pullable[$repository_id], 272 + $future, 273 + $min_sleep); 274 + } 273 275 274 276 // We have a free slot now, so go try to fill it. 275 277 break;