FIX Remove curly brace access to string offsets, deprecated in PHP 7.4

This commit is contained in:
Robbie Averill 2019-07-24 12:17:49 +02:00
parent f1d8a04928
commit d1c927ff23

View File

@ -192,8 +192,9 @@ class Email extends ViewableData
return strtr($email, $obfuscated);
case 'hex':
$encoded = '';
for ($x = 0; $x < strlen($email); $x++) {
$encoded .= '&#x' . bin2hex($email{$x}) . ';';
$emailLength = strlen($email);
for ($x = 0; $x < $emailLength; $x++) {
$encoded .= '&#x' . bin2hex($email[$x]) . ';';
}
return $encoded;