Skip to content
Snippets Groups Projects
Commit 4af8179e authored by Justus Dieckmann's avatar Justus Dieckmann Committed by Tobias Reischmann
Browse files

Check $settings-array for being null before accessing it

parent 09940e45
Branches
Tags
No related merge requests found
...@@ -269,6 +269,7 @@ class email extends libbase { ...@@ -269,6 +269,7 @@ class email extends libbase {
* @param array $settings array containing the settings from the db. * @param array $settings array containing the settings from the db.
*/ */
public function extend_add_instance_form_definition_after_data($mform, $settings) { public function extend_add_instance_form_definition_after_data($mform, $settings) {
$mform->setDefault('contenthtml', array('text' => $settings['contenthtml'], 'format' => FORMAT_HTML)); $mform->setDefault('contenthtml',
array('text' => isset($settings['contenthtml']) ? $settings['contenthtml'] : '', 'format' => FORMAT_HTML));
} }
} }
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment