Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
HalJordan opened this issue May 21, 2022 · 1 comment

Comments

@HalJordan
Copy link

src/Reducer/EvalReducer.php

src/Reducer/EvalReducer.php:        if (substr($code, 0, 2) == '?>' && $code{2} != '<') {
src/Reducer/EvalReducer.php:            $code{0} = '<';
src/Reducer/EvalReducer.php:            $code{1} = '?';

Those 3 lines just need to be changed.

@simon816
Copy link
Owner

For reference, this is due to curly braces for string indexes being removed in PHP 8:

https://www.php.net/manual/en/language.types.string.php

Note: Prior to PHP 8.0.0, strings could also be accessed using braces, as in $str{42}, for the same purpose. This curly brace syntax was deprecated as of PHP 7.4.0 and no longer supported as of PHP 8.0.0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants