@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: Do not pass empty query keys in PhabricatorUserProfileImageCacheType

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/people/cache/PhabricatorUserProfileImageCacheType.php:68]
```

Closes T16365

Test Plan: `./bin/lipsum generate user`

Reviewers: O1 Blessed Committers, mainframe98

Reviewed By: O1 Blessed Committers, mainframe98

Subscribers: tobiaswiese, valerio.bozzolan, Matthew, Cigaryno

Maniphest Tasks: T16365

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

+2 -2
+2 -2
src/applications/people/cache/PhabricatorUserProfileImageCacheType.php
··· 65 65 foreach ($users as $user) { 66 66 $image_phid = $user->getProfileImagePHID(); 67 67 $default_phid = $user->getDefaultProfileImagePHID(); 68 - if (isset($files[$image_phid])) { 68 + if ($image_phid && isset($files[$image_phid])) { 69 69 $image_uri = $files[$image_phid]->getBestURI(); 70 - } else if (isset($files[$default_phid])) { 70 + } else if ($default_phid && isset($files[$default_phid])) { 71 71 $image_uri = $files[$default_phid]->getBestURI(); 72 72 } else { 73 73 $image_uri = PhabricatorUser::getDefaultProfileImageURI();