@@ -, +, @@ without birth date have enpty birth date field --- Koha/Patron.pm | 3 ++- members/moremember.pl | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) --- a/Koha/Patron.pm +++ a/Koha/Patron.pm @@ -545,7 +545,8 @@ Return the age of the patron sub get_age { my ($self) = @_; my $today_str = dt_from_string->strftime("%Y-%m-%d"); - my $dob_str = dt_from_string( $self->dateofbirth )->strftime("%Y-%m-%d"); + my $dob_str = dt_from_string( $self->dateofbirth ) || return; + $dob_str = $dob_str->strftime("%Y-%m-%d"); my ( $dob_y, $dob_m, $dob_d ) = split /-/, $dob_str; my ( $today_y, $today_m, $today_d ) = split /-/, $today_str; --- a/members/moremember.pl +++ a/members/moremember.pl @@ -146,7 +146,7 @@ foreach (qw(dateenrolled dateexpiry dateofbirth)) { $data->{$_} = ''; next; } - $template->param( $_ => dt_from_string( $userdate ) ); + $data->{$_} = dt_from_string( $userdate ); } $data->{'IS_ADULT'} = ( $data->{'categorycode'} ne 'I' ); --