Permalink
Browse files

MDL-32438 choice: fix fatal error on making choice

  • Loading branch information...
1 parent 668a499 commit b09912f8ab6b11145fe76778f63f3f9ddcec2cc9 @micaherne micaherne committed Apr 13, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 mod/choice/lib.php
View
@@ -295,7 +295,7 @@ function choice_user_submit_response($formanswer, $choice, $userid, $course, $cm
$DB->update_record("choice_answers", $newanswer);
add_to_log($course->id, "choice", "choose again", "view.php?id=$cm->id", $choice->id, $cm->id);
} else {
- $newanswer = stdClass();
+ $newanswer = new stdClass();
$newanswer->choiceid = $choice->id;
$newanswer->userid = $userid;
$newanswer->optionid = $formanswer;

0 comments on commit b09912f

Please sign in to comment.