From: Ivan Kohler Date: Mon, 9 Sep 2013 06:11:49 +0000 (-0700) Subject: avoid warning noise X-Git-Url: http://git.freeside.biz/gitweb/?a=commitdiff_plain;h=b3d1c3b997841b5918c37720d440038dd9947410;p=freeside.git avoid warning noise --- diff --git a/FS/FS/svc_phone.pm b/FS/FS/svc_phone.pm index 5cd53122c..74e49d473 100644 --- a/FS/FS/svc_phone.pm +++ b/FS/FS/svc_phone.pm @@ -529,7 +529,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)) );