From a8e577debbed0ed69a05bc086ba980dc39f05b49 Mon Sep 17 00:00:00 2001 From: Tim Hunt Date: Wed, 16 Jan 2013 11:13:53 +0000 Subject: [PATCH] MDL-37374 questions: fix property_exists calls. --- question/type/edit_question_form.php | 2 +- question/type/questiontypebase.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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; } }