Commit dd1546f5 authored by Arturo-q's avatar Arturo-q Committed by De Araujo, Renato [CONBR Non-J&J]
Browse files

Issue #3317100 by Arturo1007, maxstarkenburg, RenatoG: Json error if no...

Issue #3317100 by Arturo1007, maxstarkenburg, RenatoG: Json error if no classes exist yet when trying to see classes used
parent 90313f1a
Loading
Loading
Loading
Loading
+5 −3
Original line number Diff line number Diff line
@@ -258,7 +258,7 @@ class BlockClassController extends ControllerBase {
    $table .= '</thead>';
    $table .= '<tbody>';

    $block_classes_stored = [];
    $block_classes_stored = '';

    $config = $this->configFactory->getEditable('block_class.settings');

@@ -270,8 +270,10 @@ class BlockClassController extends ControllerBase {
    // Get the array.
    $block_classes_stored = Json::decode($block_classes_stored);

    if ($block_classes_stored != NULL) {
      // Get the array values and id in the keys.
      $block_classes_stored = array_values($block_classes_stored);
    }

    foreach ($block_classes_stored as $block_class) {