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

PHP8.0 issue in interpret_subcontents - with a particular question #61

Open
nwp90 opened this issue Apr 11, 2022 · 2 comments
Open

PHP8.0 issue in interpret_subcontents - with a particular question #61

nwp90 opened this issue Apr 11, 2022 · 2 comments

Comments

@nwp90
Copy link

nwp90 commented Apr 11, 2022

[11-Apr-2022 08:13:54 Pacific/Auckland] PHP Warning: foreach() argument must be of type array|object, null given in /d1/srv/moodle/otagounifom/moodle/question/type/pmatch/pmatch/interpreter.php on
line 178
[11-Apr-2022 08:13:54 Pacific/Auckland] Database transaction aborted automatically in /d1/srv/moodle/otagounifom/moodle/mod/quiz/processattempt.php
[11-Apr-2022 08:13:54 Pacific/Auckland] Default exception handler: An error occurred while processing your responses (Coding error detected, it must be fixed by a programmer: Oops. You called matches for an expression that is not valid. You should call is_valid first. Interpreter error :Non recognized sub content in code fragment "match_mw (less*|smal".). Click continue to return to the page you were on and try again. Debug:
Error code: errorprocessingresponses

  • line 2479 of /mod/quiz/attemptlib.php: moodle_exception thrown
  • line 89 of /mod/quiz/processattempt.php: call to quiz_attempt->process_attempt()

Not currently clear what has caused this - maybe an invalid match expression?

@timhunt
Copy link
Member

timhunt commented Apr 11, 2022

I can't reproduce the error just by copying the bit of pmatch expression from the error message into a new question.

To progress this, we will need more information. Can you find the question that triggered this error? (Try searching in the question_answers table in the database for match_mw (less*| or something.

If you find the question, can you edit and/or preview it? If so, can you reproduce the error?

@nwp90
Copy link
Author

nwp90 commented Apr 12, 2022

We're not yet able to reliably reproduce it either; working on it.

@timhunt timhunt changed the title PHP8.0 issue in interpret_subcontents PHP8.0 issue in interpret_subcontents - with a particular question Aug 9, 2022
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