MDL-56430 message: fix php7 incompatibility in processor form

This commit is contained in:
Ryan Wyllie
2016-10-17 00:27:56 +00:00
parent 6a69cda97d
commit cdff0944b6
+3 -1
View File
@@ -2115,7 +2115,9 @@ class core_message_external extends external_api {
$form = new stdClass();
foreach ($formvalues as $formvalue) {
$form->$formvalue['name'] = $formvalue['value'];
// Curly braces to ensure interpretation is consistent between
// php 5 and php 7.
$form->{$formvalue['name']} = $formvalue['value'];
}
$processor->process_form($form, $preferences);