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

Fix PHP 8.1 Fatal error in Figlet: Use square brackets instead of curly braces

Summary:
Replace curly with square brackets when accessing an array value. See
https://www.php.net/manual/en/migration74.deprecated.php#migration74.deprecated.core.array-string-access-curly-brace
https://wiki.php.net/rfc/deprecate_curly_braces_array_access#wasn_t_the_curly_brace_syntax_deprecated_once_before

Closes T15406

Test Plan:
Fixed these two lines; afterwards Figlet rendered in task comment preview. Example figlet:

```
figlet {{{ stuff }}}
```

Reviewers: O1 Blessed Committers, valerio.bozzolan

Reviewed By: O1 Blessed Committers, valerio.bozzolan

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

Maniphest Tasks: T15406

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

+2 -2
+2 -2
externals/pear-figlet/Text/Figlet.php
··· 231 231 $i = hexdec(substr($i, 2)); 232 232 } else { 233 233 // If octal 234 - if ($i{0} === '0' && $i !== '0' || substr($i, 0, 2) == '-0') { 234 + if ($i[0] === '0' && $i !== '0' || substr($i, 0, 2) == '-0') { 235 235 $i = octdec($i); 236 236 } 237 237 } ··· 274 274 $lt = hexdec(substr($str, $i+2, 4)); 275 275 $i += 5; 276 276 } else { 277 - $lt = ord($str{$i}); 277 + $lt = ord($str[$i]); 278 278 } 279 279 280 280 $hb = preg_quote($this->hardblank, '/');