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>
This commit is contained in:
parent
0d663c7e8a
commit
6a56ada2f1
|
|
@ -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) );
|
||||
|
|
|
|||
Loading…
Reference in New Issue