MDL-52335 mod_data: php7 compatibility in variable syntax
authorMarina Glancy <marina@moodle.com>
Wed, 2 Dec 2015 06:01:53 +0000 (14:01 +0800)
committerMarina Glancy <marina@moodle.com>
Thu, 3 Dec 2015 01:31:25 +0000 (09:31 +0800)
mod/data/field/textarea/field.class.php

index a6e1b4c..ddf5486 100644 (file)
@@ -199,7 +199,7 @@ class data_field_textarea extends data_field_base {
                 // the value will be retrieved by file_get_submitted_draft_itemid, do not need to save in DB
                 return true;
             } else {
-                $content->$names[2] = clean_param($value, PARAM_NOTAGS);  // content[1-4]
+                $content->{$names[2]} = clean_param($value, PARAM_NOTAGS);  // content[1-4]
             }
         } else {
             $content->content = clean_param($value, PARAM_CLEAN);