Skip to content

Commit

Permalink
Force block config to be returned as array (#48)
Browse files Browse the repository at this point in the history
Fixes #23, reverts #46 and replaces #47
  • Loading branch information
damsfx authored Feb 12, 2025
1 parent b46e86a commit b78f451
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions classes/Block.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
use Cms\Classes\Controller;
use Cms\Classes\PartialStack;
use Illuminate\Support\Facades\Lang;
use Illuminate\Support\Fluent;
use Winter\Storm\Exception\SystemException;

/**
Expand Down Expand Up @@ -107,7 +106,7 @@ public static function renderAll(array $blocks, ?Controller $controller = null):
$config = static::getDefaultConfig($block['_group']);
}

$partialData['config'] = new Fluent($config);
$partialData['config'] = json_decode(json_encode($config), true);

$content .= $controller->renderPartial($block['_group'] . '.block', $partialData);
}
Expand Down

0 comments on commit b78f451

Please sign in to comment.