- Fixed a bug related to encoding into a template exception
This commit is contained in:
1 parent
2931a462c0
commit
0eed9b76af
1 file changed
+3
-1
@@ -31,6 +31,8 @@ class BlockToken implements ControlStructure {
|
||||
return "<?php echo \$___block->render(\$___class__template); unset(\$___block); ?>";
|
||||
|
||||
case "arguments":
|
||||
$cleanArguments = htmlspecialchars($arguments);
|
||||
|
||||
return <<<PHP
|
||||
<?php
|
||||
try {
|
||||
@@ -42,7 +44,7 @@ class BlockToken implements ControlStructure {
|
||||
\$showArgs = fn(\$e) => (\$type = gettype(\$e)) === 'object' ? \$e::class : \$type;
|
||||
|
||||
throw new \Exception(
|
||||
sprintf('A block awaiting arguments (%s) instead received (%s) with values (%s)', '$arguments', implode(', ', array_map(\$showArgs, \$inlineVariables ?? [])), json_encode(\$inlineVariables))
|
||||
sprintf('A block awaiting arguments (%s) instead received (%s) with values (%s)', '$cleanArguments', implode(', ', array_map(\$showArgs, \$inlineVariables ?? [])), json_encode(\$inlineVariables))
|
||||
);
|
||||
}
|
||||
/*%EXCEPTION_LINE_BASE%*/?>
|
||||
|
||||
Reference in new issue
Block a user