From 34debcbddcd367ec2f3ec062a37f62cda3a8097b Mon Sep 17 00:00:00 2001 From: Lee Rowlands Date: Sat, 24 Jun 2017 16:17:54 +1000 Subject: [PATCH] Issue #2837011 by johndevman, pk188: Cannot set a text format to use a text editor without settings --- core/modules/editor/editor.module | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/core/modules/editor/editor.module b/core/modules/editor/editor.module index dccf8239b5f..7cba93886c0 100644 --- a/core/modules/editor/editor.module +++ b/core/modules/editor/editor.module @@ -245,7 +245,9 @@ function editor_form_filter_admin_format_submit($form, FormStateInterface $form_ // Ensure the text format is set: when creating a new text format, this // would equal the empty string. $editor->set('format', $format_id); - $editor->setSettings($form_state->getValue(['editor', 'settings'])); + if ($settings = $form_state->getValue(['editor', 'settings'])) { + $editor->setSettings($settings); + } $editor->save(); } }