diff options
author | Ivan Kohler <ivan@freeside.biz> | 2012-06-20 02:45:27 -0700 |
---|---|---|
committer | Ivan Kohler <ivan@freeside.biz> | 2012-06-20 02:45:27 -0700 |
commit | b7d8bc26840a8238cd8c41faf5ba78abfceac383 (patch) | |
tree | 21773cfdfb1d53e9dc3b4dc7e68d5d03d9cd9019 | |
parent | ebc849c7b6d613f4853a581277d72db004a0bc9d (diff) |
fix flat_introrate without an introductory period, RT#18124
-rw-r--r-- | FS/FS/part_pkg/flat_introrate.pm | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/FS/FS/part_pkg/flat_introrate.pm b/FS/FS/part_pkg/flat_introrate.pm index 33cc3d48a..10c205609 100644 --- a/FS/FS/part_pkg/flat_introrate.pm +++ b/FS/FS/part_pkg/flat_introrate.pm @@ -32,8 +32,8 @@ sub base_recur { warn "flat_introrate base_recur requires date!" if !$time; my $now = $time ? $$time : time; - my ($duration) = ($self->option('intro_duration') =~ /^(\d+)$/); - unless ($duration) { + my ($duration) = ($self->option('intro_duration') =~ /^\s*(\d+)\s*$/); + unless (length($duration)) { die "Invalid intro_duration: " . $self->option('intro_duration'); } my $intro_end = $self->add_freq($cust_pkg->setup, $duration); |