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

Deprecated syntax cause PHP Error in Questions Import #3

Open
leozelion opened this issue Oct 17, 2023 · 1 comment
Open

Deprecated syntax cause PHP Error in Questions Import #3

leozelion opened this issue Oct 17, 2023 · 1 comment

Comments

@leozelion
Copy link

I get this error "Array and string offset access syntax with curly braces is no longer supported" in page moodle-url.com/question/bank/importquestions/import.php.
Moodle 4.1, PHP 8.1.
This syntax was deprecated since PHP 7.4.

format.php:381: } else if ($answertext{0} == '#') {
must be: } else if ($answertext[0] == '#') {

Please, fix it in repository for other moodlers ;)

@nbourre
Copy link

nbourre commented May 30, 2024

I have merged what seems to be a working branch. You can find my fork here.

https://github.com/nbourre/moodle-qformat_giftmedia

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