diff options
| author | Ivan Kohler <ivan@freeside.biz> | 2012-06-20 02:45:29 -0700 |
|---|---|---|
| committer | Ivan Kohler <ivan@freeside.biz> | 2012-06-20 02:45:29 -0700 |
| commit | 226617fbfba28e74fb8175f6ce77a09302809128 (patch) | |
| tree | 1d5af7d355407369bc9dae36d7189071b950687b | |
| parent | 0bc8846f748977f897c35de1f227a45fd9ac7758 (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); |
