From c5ca4f6391913acac6ba561ad0e580e6064f25b5 Mon Sep 17 00:00:00 2001 From: Nahuel ANGELINETTI Date: Fri, 30 Jan 2009 16:48:02 +0100 Subject: [PATCH] (bug #2937) use check_date in C4::Serials::hassubscriptionexpired This patch change the date check in hassubscriptionexpired to use Date_Calc::check_date Signed-off-by: Galen Charlton --- C4/Serials.pm | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/C4/Serials.pm b/C4/Serials.pm index e087012ec3..2cea727086 100644 --- a/C4/Serials.pm +++ b/C4/Serials.pm @@ -1806,9 +1806,7 @@ sub HasSubscriptionExpired { return 0 unless $res; my @res=split (/-/,$res); my @endofsubscriptiondate=split(/-/,$expirationdate); - foreach (@res,@endofsubscriptiondate){ - return 2 unless $_ ; - } + return 2 if (not check_date(@res) || not check_date(@endofsubscriptiondate)); return 1 if ( (@endofsubscriptiondate && Delta_Days($res[0],$res[1],$res[2], $endofsubscriptiondate[0],$endofsubscriptiondate[1],$endofsubscriptiondate[2]) <= 0) || (!$res)); -- 2.39.2