From: Ivan Kohler Date: Mon, 9 Sep 2013 06:11:48 +0000 (-0700) Subject: avoid warning noise X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=commitdiff_plain;h=3c6f0de5bf97a8a44e5d9e269629345305f87b1d avoid warning noise --- diff --git a/FS/FS/svc_phone.pm b/FS/FS/svc_phone.pm index 65a98d25a..77b013726 100644 --- a/FS/FS/svc_phone.pm +++ b/FS/FS/svc_phone.pm @@ -527,7 +527,7 @@ sub check { unless ( length($self->pin) ) { my $random_pin = $conf->config('svc_phone-random_pin'); - if ( $random_pin =~ /^\d+$/ ) { + if ( defined($random_pin) && $random_pin =~ /^\d+$/ ) { $self->pin( join('', map int(rand(10)), 0..($random_pin-1)) );