From ac27005b0d6848f3e1118206df088d51bb0a489d Mon Sep 17 00:00:00 2001 From: Marcel de Rooy Date: Thu, 23 Feb 2012 09:46:32 +0100 Subject: [PATCH] 7453 Followup for borrower without expiry date While it should be impossible now to have a patron without expiry date, I still had one. It does not hurt to add a simple check on expiry date defined before calling delta days on null values and breaking the opac login. Trivial change. Signed-off-by: Marcel de Rooy Signed-off-by: Katrin Fischer Tested by deleting the expirydate from my own patron record. Missing expiry date now no longer breaks the summary page in the patron account on OPAC. Signed-off-by: Paul Poulain Signed-off-by: Jared Camins-Esakov --- opac/opac-user.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/opac/opac-user.pl b/opac/opac-user.pl index 1ad5315713..0782c985b6 100755 --- a/opac/opac-user.pl +++ b/opac/opac-user.pl @@ -112,7 +112,7 @@ my @bordat; $bordat[0] = $borr; # Warningdate is the date that the warning starts appearing -if ( C4::Context->preference('NotifyBorrowerDeparture') && +if ( $borr->{dateexpiry} && C4::Context->preference('NotifyBorrowerDeparture') && Date_to_Days(Add_Delta_Days($warning_year,$warning_month,$warning_day,- C4::Context->preference('NotifyBorrowerDeparture'))) < Date_to_Days( $today_year, $today_month, $today_day ) ) { -- 2.39.5