Skip to content

Commit afb2a34

Browse files
committed
Dereference array
1 parent e647c4b commit afb2a34

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/ChGovUk/Plugins/FormHelpers.pm

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -502,15 +502,15 @@ sub _get_errors_for_field {
502502
$error_hash{text} = $error;
503503

504504
if ($self->_is_warning($rule)) {
505-
push $self->warnings, \%error_hash;
505+
push @{$self->warnings}, \%error_hash;
506506
} else {
507507
my $error_id = $self->_field_name_to_id($field) . '-' . $rule . '-error';
508508
push @errors, { text => $error, id => $error_id };
509509

510510
# Does the controller have a corresponding field?
511511
if (defined $self->labels->{$field} ) {
512512
$error_hash{id} = $error_id;
513-
push $self->errors, \%error_hash;
513+
push @{$self->errors}, \%error_hash;
514514
}
515515
}
516516
}

0 commit comments

Comments
 (0)