mirror of
https://we.phorge.it/source/phorge.git
synced 2024-12-22 13:30:55 +01:00
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
This commit is contained in:
parent
94d45de2f7
commit
f97c9d68d0
1 changed files with 2 additions and 2 deletions
4
externals/pear-figlet/Text/Figlet.php
vendored
4
externals/pear-figlet/Text/Figlet.php
vendored
|
@ -231,7 +231,7 @@ class Text_Figlet
|
|||
$i = hexdec(substr($i, 2));
|
||||
} else {
|
||||
// If octal
|
||||
if ($i{0} === '0' && $i !== '0' || substr($i, 0, 2) == '-0') {
|
||||
if ($i[0] === '0' && $i !== '0' || substr($i, 0, 2) == '-0') {
|
||||
$i = octdec($i);
|
||||
}
|
||||
}
|
||||
|
@ -274,7 +274,7 @@ class Text_Figlet
|
|||
$lt = hexdec(substr($str, $i+2, 4));
|
||||
$i += 5;
|
||||
} else {
|
||||
$lt = ord($str{$i});
|
||||
$lt = ord($str[$i]);
|
||||
}
|
||||
|
||||
$hb = preg_quote($this->hardblank, '/');
|
||||
|
|
Loading…
Reference in a new issue