Skip to content

Commit

Permalink
DefaultFormRenderer: fixed cummulate instances of Nette\HtmlStringable [
Browse files Browse the repository at this point in the history
Closes #335]
  • Loading branch information
dg committed Aug 5, 2024
1 parent 0fe57bf commit b8d45e8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Forms/Rendering/DefaultFormRenderer.php
Original file line number Diff line number Diff line change
Expand Up @@ -225,10 +225,10 @@ private function doRenderErrors(array $errors, bool $control): string
}

$container = $this->getWrapper($control ? 'control errorcontainer' : 'error container');
$item = $this->getWrapper($control ? 'control erroritem' : 'error item');
$itemPrototype = $this->getWrapper($control ? 'control erroritem' : 'error item');

foreach ($errors as $error) {
$item = clone $item;
$item = clone $itemPrototype;
if ($error instanceof HtmlStringable) {
$item->addHtml($error);
} else {
Expand Down

0 comments on commit b8d45e8

Please sign in to comment.