Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Bug 6236 : When checking for expiry don't try to process 0 dates

Signed-off-by: Nicole C. Engard <nengard@bywatersolutions.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
  • Loading branch information...
commit 6a56ada2f144f8212c5212d19ab886b7702d075c 1 parent 0d663c7
@colinsc colinsc authored ranginui committed
Showing with 3 additions and 1 deletion.
  1. +3 −1 C4/Serials.pm
View
4 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) );
Please sign in to comment.
Something went wrong with that request. Please try again.