Skip to content

Commit 7d05489

Browse files
committed
Throw exception when template renderer is not found in critical templates
1 parent 66b05d6 commit 7d05489

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

view/adminhtml/templates/form/field.phtml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,10 @@ use Loki\Components\Util\Block\TemplateRenderer;
1616
/** @var TemplateRenderer $templateRenderer */
1717
/** @var ViewModelFactory $viewModelFactory */
1818

19+
if (empty($templateRenderer)) {
20+
throw new RuntimeException('Template renderer not found in block "'.$block->getNameInLayout().'"');
21+
}
22+
1923
$field = $block->getField();
2024
if (false === $field instanceof Field) {
2125
$fieldViewModel = $viewModelFactory->create(FieldViewModel::class);

0 commit comments

Comments
 (0)