From 718d8ba2aa2abeaf177827f55f98bf27c5fe6177 Mon Sep 17 00:00:00 2001 From: Nahuel ANGELINETTI Date: Thu, 14 Jan 2010 16:34:17 +0100 Subject: [PATCH] (bug #4044) don't trap fatal error if there is no start date this fix GetExpirationDate that trap a fatal error if the subscription have not any start date. --- C4/Serials.pm | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/C4/Serials.pm b/C4/Serials.pm index fdf15e1dcc..2f5f27f706 100644 --- a/C4/Serials.pm +++ b/C4/Serials.pm @@ -1011,7 +1011,9 @@ sub GetExpirationDate { my $dbh = C4::Context->dbh; my $subscription = GetSubscription($subscriptionid); my $enddate = $subscription->{startdate}; - + + return if not $subscription->{startdate}; + # we don't do the same test if the subscription is based on X numbers or on X weeks/months if (($subscription->{periodicity} % 16) >0){ if ( $subscription->{numberlength} ) { -- 2.39.5