[html-formfu] [patch] bug in Constraint::MinMaxFields

Carl Franks fireartist at gmail.com
Wed Dec 3 10:14:14 GMT 2008


2008/11/21 Ronald J Kimball <rkimball+formfu at pangeamedia.com>:
> I just discovered a little bug in the MinMaxFields constraint.  The code
> that sets the default value for $max assumes that $others is an array ref:
>
>    my $max = defined $self->maximum ? $self->maximum
>            :                          1 + scalar @$others;
>
> However, $others can sometimes be a single value, which is accounted for
> later in the code:
>
>    push @names, ref $others ? @{$others} : $others;
>
>
> Patch attached.  Includes a new test that fails with the existing code and
> succeeds with the patch applied.

Thanks, I've applied this to svn.

Cheers,
Carl



More information about the HTML-FormFu mailing list