10 Oca 2023
by Şerif Çiçek

Php Excel autoloader error

Php array and string offset access syntax with curly braces is no longer supported

Exception has occurred.

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


Open the PHPExcel/Shared/String.php

find the following in autoloader   

            if ($bom_be) {

                $val = ord($str{$i})   << 4;

                $val += ord($str{$i+1});

            } else {

                $val = ord($str{$i+1}) << 4;

                $val += ord($str{$i});

            }

change to 

            if ($bom_be) {

                $val = ord($str[$i])   << 4;

                $val += ord($str[$i+1]);

            } else {

                $val = ord($str[$i+1]) << 4;

                $val += ord($str[$i]);

            }


You are getting this error because of php version.

replace curly brackets with square brackets.


Add Comment
Yorum yazmak için lütfen üye olunuz