Skip to content

Commit

Permalink
Get rid of a PHP notice
Browse files Browse the repository at this point in the history
  • Loading branch information
gustav_delius committed Jul 6, 2005
1 parent f022a9b commit 5cbc7a8
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions mod/quiz/questiontypes/match/questiontype.php
Expand Up @@ -131,8 +131,10 @@ function restore_session_and_responses(&$question, &$state) {

// Restore the previous responses
$state->responses = array();
foreach ($responses as $response) {
$state->responses[$response[0]] = $response[1];
if ($responses) {
foreach ($responses as $response) {
$state->responses[$response[0]] = $response[1];
}
}

if (!$state->options->subquestions = get_records('quiz_match_sub',
Expand Down

0 comments on commit 5cbc7a8

Please sign in to comment.