PHP Fatal error: Array and string offset access syntax with curly braces is no longer supported in

 For making MailWatch work with Debian 11 and PHP 8, I had Fixed few code-file to avoid error :

PHP Fatal error: Array and string offset access syntax.

Sharing below changes for users using with PHP8., Hopeful to update in new version or users trying to use MailWatch with PHP8.
-Deepen.

Please change this 100% working

$c1 = $text[$i];

            if ($c1 >= "\xc0") { //Should be converted to UTF8, if it's not UTF8 already

                $c2 = $i+1 >= $max? "\x00" : $text[$i+1];

                $c3 = $i+2 >= $max? "\x00" : $text[$i+2];

                $c4 = $i+3 >= $max? "\x00" : $text[$i+3];


Solution




No comments:

Post a Comment

CPU vs GPU Architecture

  CPU vs GPU Architecture CPU (Central Processing Unit) and GPU (Graphics Processing Unit) have distinct architectural differences, optimize...

Best for you