barryvdh / laravel-elfinder

elFinder bundle for Laravel
738 stars 171 forks source link

php artisan elfinder:publish [ErrorException : Array and string offset access syntax with curly braces is deprecated] #266

Closed whendy closed 4 years ago

whendy commented 4 years ago

Laravel : 6.x Php : 7.4.0 (cli) (built: Nov 30 2019 10:43:49) Laravel Elfinder : 0.4.3

when install fresh, then php artisan elfinder:publish, got error :

ErrorException  : Array and string offset access syntax with curly braces is deprecated
in
vendor/studio-42/elfinder/php/elFinder.class.php:2614

.....
 if ($url{0} != '/') { // Relative path
.....

Solved this with change on this line like

.....
 if ($url[0] != '/') { // Relative path
.....

Maybe this issue should have been directed at elfinder / studio-42

Thank you.

gwaldvogel commented 4 years ago

Had the same problem, I created a PR for the changes: https://github.com/Studio-42/elFinder/pull/3070

barryvdh commented 4 years ago

Fixed upstream