Skip to content
Browse files

MDL-37374 questions: fix property_exists calls.

  • Loading branch information...
1 parent 7d9ce88 commit 4ca741e456793956c9f4a604ece7e5b0aa7eeb86 @timhunt timhunt committed Jan 16, 2013
Showing with 2 additions and 2 deletions.
  1. +1 −1 question/type/edit_question_form.php
  2. +1 −1 question/type/questiontypebase.php
View
2 question/type/edit_question_form.php
@@ -481,7 +481,7 @@ public function set_data($question) {
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;
}
}
View
2 question/type/questiontypebase.php
@@ -454,7 +454,7 @@ public function save_question_options($question) {
$options->$questionidcolname = $question->id;
}
foreach ($extraquestionfields as $field) {
- if (property_exists($question->$field)) {
+ if (property_exists($question, $field)) {
$options->$field = $question->$field;
}
}

0 comments on commit 4ca741e

Please sign in to comment.
Something went wrong with that request. Please try again.