From d1c927ff2372a422ca8d5145aee6ba5192355f80 Mon Sep 17 00:00:00 2001 From: Robbie Averill Date: Wed, 24 Jul 2019 12:17:49 +0200 Subject: [PATCH] FIX Remove curly brace access to string offsets, deprecated in PHP 7.4 --- src/Control/Email/Email.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/Control/Email/Email.php b/src/Control/Email/Email.php index c343fade4..f60b4286e 100644 --- a/src/Control/Email/Email.php +++ b/src/Control/Email/Email.php @@ -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;