1
0
mirror of https://github.com/postfixadmin/postfixadmin.git synced 2025-08-07 17:42:53 +03:00

stop using { } for string character access (use [ ] instead) - see https://www.php.net/manual/en/language.types.string.php#language.types.string.substr

This commit is contained in:
David Goodwin
2020-01-31 14:28:54 +00:00
parent 79c2e77a00
commit aa37ab57e6

View File

@@ -739,7 +739,7 @@ function encode_header($string, $default_charset = "utf-8") {
$ret = ''; $ret = '';
$iEncStart = false; $iEncStart = false;
} else { } else {
$ret .= sprintf("=%02X", ord($string{$i})); $ret .= sprintf("=%02X", ord($string[$i]));
} }
break; break;
case '(': case '(':
@@ -769,7 +769,7 @@ function encode_header($string, $default_charset = "utf-8") {
} }
break; break;
default: default:
$k = ord($string{$i}); $k = ord($string[$i]);
if ($k > 126) { if ($k > 126) {
if ($iEncStart === false) { if ($iEncStart === false) {
// do not start encoding in the middle of a string, also take the rest of the word. // do not start encoding in the middle of a string, also take the rest of the word.