Skip to content

Conversation

@emanoylov
Copy link
Contributor

OU Ref: 900306

Fix for intermittent warnings when starting "Answer the questions" as follows:

Warning: Undefined array key 1 in /var/www/html/moodle/mod/questionnaire/questionnaire.class.php on line 889

Warning: foreach() argument must be of type array|object, null given in /var/www/html/moodle/mod/questionnaire/questionnaire.class.php on line 889

Warning: Undefined array key 1 in /var/www/html/moodle/mod/questionnaire/questionnaire.class.php on line 1329

Warning: foreach() argument must be of type array|object, null given in /var/www/html/moodle/mod/questionnaire/questionnaire.class.php on line 1329

@mchurchward
Copy link
Contributor

Have you determined what situation causes this? It would be good to know why that error has occurred.

@emanoylov
Copy link
Contributor Author

We got these warnings when you go to a questionnaire and start answering the questions.
They happened intermittently so the fix is just preventative code which is also used in other places within the plugin.

Copy link
Contributor

@mchurchward mchurchward left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would be best if we knew what caused this, but for now this fix seems okay.

@mchurchward mchurchward merged commit c7d8281 into PoetOS:MOODLE_404_STABLE Nov 11, 2025
3 checks passed
mchurchward pushed a commit that referenced this pull request Nov 11, 2025
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

Successfully merging this pull request may close these issues.

2 participants