contributte / forms-multiplier

:repeat: Form multiplier & replicator for Nette Framework
https://contributte.org/packages/contributte/forms-multiplier.html
MIT License
26 stars 21 forks source link

Type error when adding a copy containing another multiplier #53

Closed LiborSitek closed 3 years ago

LiborSitek commented 4 years ago

Hi, I have found a bug on line https://github.com/contributte/forms-multiplier/blob/master/src/Multiplier.php#L297 When adding a copy with another multiplier, attribute $values contains object ArrayHash instead of array causing TypeError (ComponentResolver requires array as second parameter). This minor change should fix that: $resolver = new ComponentResolver($this->httpData, (array) $this->values, $this->maxCopies, $this->minCopies);

f3l1x commented 3 years ago

Hi @LiborSitek, could you test latest dev-master?

LiborSitek commented 3 years ago

Hi @LiborSitek, could you test latest dev-master?

Tested, it seems it works fine now, the bug does not appear any more.