diff --git a/src/Form/Form.php b/src/Form/Form.php index dc86a5d..61d4f57 100644 --- a/src/Form/Form.php +++ b/src/Form/Form.php @@ -284,7 +284,11 @@ public function decorate($for): Decorator public function getHandlerDecorator($fieldName = null): DataHandlerDecorator { - return $this->_handlerDecorator[$fieldName] ?? $this->_defaultHandlerDecorator(); + if(!isset($this->_handlerDecorator[$fieldName])) + { + $this->_handlerDecorator[$fieldName] = clone $this->_defaultHandlerDecorator(); + } + return $this->_handlerDecorator[$fieldName]; } public function setHandlerDecorator(DataHandlerDecorator $decorator, string $field = null)