Commit c304e995 authored by Frédéric BISSON's avatar Frédéric BISSON Committed by De Araujo, Renato [CONBR Non-J&J]
Browse files

Issue #3304587 by Anybody, Zigazou, RenatoG, xaa, MaxMendez, demon326, VVS,...

Issue #3304587 by Anybody, Zigazou, RenatoG, xaa, MaxMendez, demon326, VVS, joseph.olstad: Using block_class module with language module throws $string ("") must be a string
parent d582e4ff
Loading
Loading
Loading
Loading
+5 −5
Original line number Diff line number Diff line
default_case: 'standard'
enable_attributes: true
enable_attributes: TRUE
enable_auto_complete: TRUE
enable_id_replacement: TRUE
enable_special_chars: FALSE
field_type: 'multiple_textfields'
filter_html_clean_css_identifier: FALSE
filter_html_clean_css_identifier: ''
items_per_page: 50
qty_attributes_per_block: 10
qty_classes_per_block: 10
maxlength_attributes: FALSE
maxlength_block_class_field: 255
maxlength_id: 255
weight_attributes: ''
weight_class: ''
weight_id: ''
 No newline at end of file
weight_attributes: 0
weight_class: 0
weight_id: 0
+4 −5
Original line number Diff line number Diff line
@@ -208,9 +208,6 @@ class BlockClassHelperService {
    // Store in the config.
    $config->set('block_classes_stored', $block_classes_to_store);

    // Save.
    $config->save();

    // Store the id replacement in the settings only if it is enabled in the
    // Global Settings page.
    if (!empty($config->get('enable_id_replacement'))) {
@@ -229,9 +226,11 @@ class BlockClassHelperService {
      // Get the block class.
      $replaced_id = $entity->getThirdPartySetting('block_class', 'replaced_id');

      // Avoid store empty values.
      // Avoid store empty values, so save the current config and skip without
      // $replaced_id.
      if (empty(trim($replaced_id ?? ''))) {
        return FALSE;
        $config->save();
        return;
      }

      // Remove the extra spaces.