Subject: | [PATCH]FillInForm doesn't work properly when handling value like [0] |
If the $fdat is something like
{ foo => [0] }
then it won't work as expected.
Subject: | diff.txt |
diff -r HTML-FillInForm-1.06.orig/lib/HTML/FillInForm.pm HTML-FillInForm-1.06/lib/HTML/FillInForm.pm
132c132
< $value = (shift @$value || '') if ref($value) eq 'ARRAY';
---
> $value = (defined $value->[0] ? $value->[0] : '') if ref($value) eq 'ARRAY';
135c135
< $value = (shift @$value || '') if ref($value) eq 'ARRAY';
---
> $value = (defined $value->[0] ? $value->[0] : '') if ref($value) eq 'ARRAY';
138c138
< $value = ($value->[0] || '') if ref($value) eq 'ARRAY';
---
> $value = (defined $value->[0] ? $value->[0] : '') if ref($value) eq 'ARRAY';
214c214
< $value = (shift @$value || '') if ref($value) eq 'ARRAY';
---
> $value = (defined $value->[0] ? $value->[0] : '') if ref($value) eq 'ARRAY';