From 745c4c3da662ac71874f9be8e88d111bc6fe8b1c Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Thu, 19 Jan 2017 11:20:33 +0100 Subject: [PATCH] Bug 17933: Do not instanciate a patron if not needed Signed-off-by: Dobrica Pavlinusic Signed-off-by: Nick Clemens Signed-off-by: Kyle M Hall --- members/moremember.pl | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/members/moremember.pl b/members/moremember.pl index 51012ed0a2..b3e8d767ab 100755 --- a/members/moremember.pl +++ b/members/moremember.pl @@ -242,7 +242,9 @@ my $overdues_exist = 0; my $totalprice = 0; # Calculate and display patron's age -$template->param( age => Koha::Patron->new({ dateofbirth => $data->{dateofbirth} })->get_age ); +if ( $data->{dateofbirth} ) { + $template->param( age => Koha::Patron->new({ dateofbirth => $data->{dateofbirth} })->get_age ); +} ### ############################################################################### # BUILD HTML -- 2.39.5