@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 in AphrontFormDateControlValue

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/view/form/control/AphrontFormDateControlValue.php:329 Possibly invalid array key type string|null.
```

Reviewers: O1 Blessed Committers, mainframe98

Reviewed By: O1 Blessed Committers, mainframe98

Subscribers: tobiaswiese, valerio.bozzolan, Matthew, Cigaryno

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

+1 -1
+1 -1
src/view/form/control/AphrontFormDateControlValue.php
··· 326 326 $normalized = preg_replace('/day\z/', '', $normalized); 327 327 $normalized = preg_replace('/s\z/', '', $normalized); 328 328 329 - if (isset($colloquial[$normalized])) { 329 + if ($normalized !== null && isset($colloquial[$normalized])) { 330 330 return $colloquial[$normalized]; 331 331 } 332 332