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 {