FormFu / HTML-FormFu

HTML Form Creation, Rendering and Validation Framework. Just define the form, and let FormFu do the all heavy lifting.
http://formfu.rocks
34 stars 24 forks source link

$self->value can be undefined in _prepare_attrs when retain_default is used #35

Closed Sadrak closed 8 years ago

Sadrak commented 8 years ago

Use of uninitialized value in string eq at /path/to/lib/HTML/FormFu/Element/Select.pm line 34.

    elsif ($submitted
        && $self->retain_default
        && ( !defined $value || $value eq $EMPTY_STR )
# Bugfix
#        && defined($self->value)
        && $self->value eq $option->{value} )
    {
        $option->{attributes}{selected} = 'selected';
    }