diff --git a/src/Multiplier.php b/src/Multiplier.php index 593e6a4..8888c71 100644 --- a/src/Multiplier.php +++ b/src/Multiplier.php @@ -324,6 +324,7 @@ public function getContainers(): iterable } /** + * @param mixed[]|object $values * @internal */ public function setValues(array|object $values, bool $erase = false, bool $onlyDisabled = false): static @@ -389,7 +390,9 @@ protected function isFormSubmitted(): bool protected function loadHttpData(): void { if ($this->isFormSubmitted()) { - $httpData = Arrays::get($this->form->getHttpData(), $this->getHtmlName(), []); + /** @var array The other types from the union can only be returned when the htmlName argument is passed. https://github.com/nette/forms/pull/333 */ + $httpData = $this->getForm()->getHttpData(); + $httpData = Arrays::get($httpData, $this->getHtmlName(), []); $this->resolver = new ComponentResolver($httpData ?? [], $this->maxCopies, $this->minCopies); } }