From b8d45e8146a0881a30383dddcbfb401550cebce7 Mon Sep 17 00:00:00 2001 From: David Grudl Date: Tue, 6 Aug 2024 00:09:09 +0200 Subject: [PATCH] DefaultFormRenderer: fixed cummulate instances of Nette\HtmlStringable [Closes #335] --- src/Forms/Rendering/DefaultFormRenderer.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Forms/Rendering/DefaultFormRenderer.php b/src/Forms/Rendering/DefaultFormRenderer.php index d0fc673a..8782ff5c 100644 --- a/src/Forms/Rendering/DefaultFormRenderer.php +++ b/src/Forms/Rendering/DefaultFormRenderer.php @@ -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 {