diff --git a/question/type/edit_question_form.php b/question/type/edit_question_form.php index cee43686d5b..478cf3cbcb5 100644 --- a/question/type/edit_question_form.php +++ b/question/type/edit_question_form.php @@ -481,7 +481,7 @@ abstract class question_edit_form extends question_wizard_form { if (is_array($extraquestionfields) && !empty($question->options)) { array_shift($extraquestionfields); foreach ($extraquestionfields as $field) { - if (property_exists($question->options->$field)) { + if (property_exists($question->options, $field)) { $question->$field = $question->options->$field; } } diff --git a/question/type/questiontypebase.php b/question/type/questiontypebase.php index 615db9cfae4..0ab59f851c1 100644 --- a/question/type/questiontypebase.php +++ b/question/type/questiontypebase.php @@ -454,7 +454,7 @@ class question_type { $options->$questionidcolname = $question->id; } foreach ($extraquestionfields as $field) { - if (property_exists($question->$field)) { + if (property_exists($question, $field)) { $options->$field = $question->$field; } }