PHP-Serial icon indicating copy to clipboard operation
PHP-Serial copied to clipboard

Array and string offset access syntax with curly braces is no longer supported in /var/www/html/AIO/PhpSerial.php on line 318

Open nc8q opened this issue 1 year ago • 1 comments

Reference: "The reason is that with PHP 7.4 the array and string offset access syntax using curly braces is deprecated and it was removed entirely in PHP 8.0"

Quote:

I replaced $parity{0} with $parity[0] and both return{0} with return[0] and now there are no errors.

Regards, Chuck

nc8q avatar Nov 07 '22 12:11 nc8q

I guess, the better way is to use substr($parity,0,1) and substr($return,0,1) ist this point.

bohnelang avatar Jan 19 '24 10:01 bohnelang