From a191d56d61526c69f88fcc88cae3ad084f82e589 Mon Sep 17 00:00:00 2001 From: Colin Campbell Date: Thu, 21 Apr 2011 17:02:52 +0100 Subject: [PATCH] Bug 6236 : When checking for expiry don't try to process 0 dates Content-Type: text/plain; charset="utf-8" --- C4/Serials.pm | 4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) diff --git a/C4/Serials.pm b/C4/Serials.pm index 1f8c170..20ae7a3 100644 --- a/C4/Serials.pm +++ b/C4/Serials.pm @@ -1634,7 +1634,9 @@ sub HasSubscriptionExpired { my $sth = $dbh->prepare($query); $sth->execute($subscriptionid); my ($res) = $sth->fetchrow; - return 0 unless $res; + if (!$res || $res=~m/^0000/) { + return 0; + } my @res = split( /-/, $res ); my @endofsubscriptiondate = split( /-/, $expirationdate ); return 2 if ( scalar(@res) != 3 || scalar(@endofsubscriptiondate) != 3 || not check_date(@res) || not check_date(@endofsubscriptiondate) ); -- 1.7.4.4