-
Bug
-
Resolution: Fixed
-
Minor
-
3.9.6, 3.10.3, 3.11
-
MOODLE_310_STABLE, MOODLE_311_STABLE, MOODLE_39_STABLE
-
MOODLE_310_STABLE, MOODLE_39_STABLE
-
master-
MDL-71376 -
The following warning is produced when accessing the quiz index page:
Warning: Creating default object from empty value in mod/quiz/index.php on line 129
This warning can be seen on Moodle versions: 3.9, 3.10, 3.11 and master when running PHP 7.4.x. On PHP versions lower than 7.4, this warning is not produced.
The offending line of code is:
$learningtable->data[] = 'hr'; |
$learningtable is not defined. It seems to be a typo.
Steps to reproduce this condition
- Set your PHP version to 7.4.x.
- On, Moodle, ensure that Developer mode and display errors are enabled.
- Access a course that uses Topics format. (You should have editing rights.)
- Turn editing on and add the Activities block to the course page.
- Add a new quiz in section 1.
- Add a new quiz in section 2.
- From the Activities block, click on Quizzes to access the quiz index page: mod/quiz/index.php
- You should see the "Warning: Creating default object from empty value" message.