MDL-60281 general: create_function is deprecated in PHP7.2
This commit is contained in:
+4
-3
@@ -1866,7 +1866,7 @@ abstract class admin_setting {
|
||||
}
|
||||
|
||||
$callbackfunction = $this->updatedcallback;
|
||||
if (!empty($callbackfunction) and function_exists($callbackfunction)) {
|
||||
if (!empty($callbackfunction) and is_callable($callbackfunction)) {
|
||||
$callbackfunction($this->get_full_name());
|
||||
}
|
||||
return true;
|
||||
@@ -5206,8 +5206,9 @@ class admin_setting_special_coursecontact extends admin_setting_pickroles {
|
||||
parent::__construct('coursecontact', get_string('coursecontact', 'admin'),
|
||||
get_string('coursecontact_desc', 'admin'),
|
||||
array('editingteacher'));
|
||||
$this->set_updatedcallback(create_function('',
|
||||
"cache::make('core', 'coursecontacts')->purge();"));
|
||||
$this->set_updatedcallback(function (){
|
||||
cache::make('core', 'coursecontacts')->purge();
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user