Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

check for existence of field in match_when before getting $field->fif

  • Loading branch information...
commit 71c896ba7a525ebfe54f12dae57c5e642bed34fc 1 parent 64535af
@gshank authored
Showing with 2 additions and 2 deletions.
  1. +2 −2 lib/HTML/FormHandler/Validate.pm
View
4 lib/HTML/FormHandler/Validate.pm
@@ -269,11 +269,11 @@ sub match_when {
my $from_form = ( $key =~ /^\+/ );
$key =~ s/^\+//;
my $field = $from_form ? $self->form->field($key) : $self->parent->subfield( $key );
- my $field_fif = defined $field->fif ? $field->fif : '';
unless ( $field ) {
- warn "field '$key' not found processing when";
+ warn "field '$key' not found processing 'when' for '" . $self->full_name . "'";
next;
}
+ my $field_fif = defined $field->fif ? $field->fif : '';
if ( ref $check_against eq 'CODE' ) {
$matched++
if $check_against->($field_fif, $self);
Please sign in to comment.
Something went wrong with that request. Please try again.