Check value is defined before splitting it

splitting an undef generates a warning
This commit is contained in:
Colin Campbell 2010-04-08 22:36:16 +01:00
parent 255362e3cf
commit cfbd0c847e

View file

@ -1591,6 +1591,9 @@ sub HasSubscriptionExpired {
my $subscription = GetSubscription($subscriptionid);
if ( ( $subscription->{periodicity} % 16 ) > 0 ) {
my $expirationdate = $subscription->{enddate};
if (!defined $expirationdate) {
$expirationdate = q{};
}
my $query = qq|
SELECT max(planneddate)
FROM serial