From 6a56ada2f144f8212c5212d19ab886b7702d075c Mon Sep 17 00:00:00 2001 From: Colin Campbell Date: Wed, 20 Apr 2011 12:45:38 -0400 Subject: [PATCH] Bug 6236 : When checking for expiry don't try to process 0 dates Signed-off-by: Nicole C. Engard Signed-off-by: Chris Cormack --- C4/Serials.pm | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/C4/Serials.pm b/C4/Serials.pm index 1f8c170445..20ae7a34a0 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) ); -- 2.39.2