From b09912f8ab6b11145fe76778f63f3f9ddcec2cc9 Mon Sep 17 00:00:00 2001 From: Michael Aherne Date: Fri, 13 Apr 2012 15:09:31 +0100 Subject: [PATCH] MDL-32438 choice: fix fatal error on making choice --- mod/choice/lib.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mod/choice/lib.php b/mod/choice/lib.php index 4736529825a..2b37b382c48 100644 --- a/mod/choice/lib.php +++ b/mod/choice/lib.php @@ -295,7 +295,7 @@ WHERE $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; -- 2.43.0