Warning: Trying to access array offset on value of type null in MatchingResponse

Created on 10 January 2023, about 2 years ago
Updated 2 November 2024, 5 months ago

After an upgrade to PHP 8.0 on a Drupal 7 site we noticed our logs were getting full. Per Student login there were around 150 of these warnings in the logs:

Warning: Trying to access array offset on value of type null in MatchingResponse->score() (regel 491 van /data/www/sitename/web/sites/all/modules/contrib/quiz/question_types/matching/matching.classes.inc).

Warning: Undefined array key "def" in MatchingResponse->score() (regel 491 van /data/www/sitename/web/sites/all/modules/contrib/quiz/question_types/matching/matching.classes.inc).

Every time a quiz was taken and the answers were matched these warnings appeared.

πŸ› Bug report
Status

Fixed

Version

5.7

Component

Code - Matching

Created by

πŸ‡³πŸ‡±Netherlands EstherTempel

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024