Security update for Core, with self-updated composer
[yaffs-website] / web / core / modules / editor / editor.module
index dccf8239b5f0860405a5963bba3786dbf33b66a7..f3bb1b5314185eb096385b83936dc1c63f4b8db3 100644 (file)
@@ -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();
   }
 }
@@ -276,7 +278,7 @@ function editor_load($format_id) {
  * @param \Drupal\filter\FilterFormatInterface|null $format
  *   The text format whose text editor will be used or NULL if the previously
  *   defined text format is now disabled.
- * @param \Drupal\filter\FilterFormatInterface $original_format|null
+ * @param \Drupal\filter\FilterFormatInterface|null $original_format
  *   (optional) The original text format (i.e. when switching text formats,
  *   $format is the text format that is going to be used, $original_format is
  *   the one that was being used initially, the one that is stored in the
@@ -432,7 +434,7 @@ function editor_entity_revision_delete(EntityInterface $entity) {
  *
  * @param array $uuids
  *   An array of file entity UUIDs.
- * @param EntityInterface $entity
+ * @param \Drupal\Core\Entity\EntityInterface $entity
  *   An entity whose fields to inspect for file references.
  */
 function _editor_record_file_usage(array $uuids, EntityInterface $entity) {
@@ -452,7 +454,7 @@ function _editor_record_file_usage(array $uuids, EntityInterface $entity) {
  *
  * @param array $uuids
  *   An array of file entity UUIDs.
- * @param EntityInterface $entity
+ * @param \Drupal\Core\Entity\EntityInterface $entity
  *   An entity whose fields to inspect for file references.
  * @param $count
  *   The number of references to delete. Should be 1 when deleting a single
@@ -543,7 +545,7 @@ function editor_file_download($uri) {
 /**
  * Finds all files referenced (data-entity-uuid) by formatted text fields.
  *
- * @param EntityInterface $entity
+ * @param \Drupal\Core\Entity\EntityInterface $entity
  *   An entity whose fields to analyze.
  *
  * @return array