Skip to content
Snippets Groups Projects
Commit c1943b7a authored by Paul Mrvik's avatar Paul Mrvik
Browse files

Issue #3482321 by globexplorer: Trying to access array offset on value of type...

Issue #3482321 by globexplorer: Trying to access array offset on value of type null in Drupal\group_welcome_message\Form\GroupWelcomeMessageForm->form()
parent 162af55d
Branches 8.x-1.x
Tags 1.2.0
No related merge requests found
......@@ -86,7 +86,7 @@ class GroupWelcomeMessageForm extends EntityForm {
'#type' => 'textfield',
'#title' => $settings->get('subject_label'),
'#maxlength' => 255,
'#default_value' => $group_welcome_message->getSubject(),
'#default_value' => $group_welcome_message->getSubject() ?? '',
'#required' => TRUE,
];
......@@ -94,7 +94,7 @@ class GroupWelcomeMessageForm extends EntityForm {
$form['body'] = [
'#type' => 'text_format',
'#title' => $settings->get('body_label'),
'#default_value' => $group_welcome_message->getBody()['value'],
'#default_value' => $group_welcome_message->getBody()['value'] ?? '',
'#required' => TRUE,
'#format' => $settings->get('selected_format'),
'#allowed_formats' => [
......@@ -105,7 +105,7 @@ class GroupWelcomeMessageForm extends EntityForm {
$form['body_existing'] = [
'#type' => 'text_format',
'#title' => $settings->get('body_existing_label'),
'#default_value' => $group_welcome_message->getBodyExisting()['value'],
'#default_value' => $group_welcome_message->getBodyExisting()['value'] ?? '',
'#required' => FALSE,
'#format' => $settings->get('selected_format'),
'#allowed_formats' => [
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment