MDL-56459 competency: Invalid use of indirect property key
[moodle.git] / competency / classes / external / exporter.php
index 1f8f7f7..d54c6c6 100644 (file)
@@ -158,7 +158,7 @@ abstract class exporter {
             } else if ($definition['type'] === PARAM_TEXT) {
                 if (!empty($definition['multiple'])) {
                     foreach ($data->$property as $key => $value) {
-                        $data->$property[$key] = external_format_string($value, $context->id);
+                        $data->{$property}[$key] = external_format_string($value, $context->id);
                     }
                 } else {
                     $data->$property = external_format_string($data->$property, $context->id);