From: ivan Date: Mon, 26 Jan 2009 01:07:19 +0000 (+0000) Subject: fix harmless warning, RT#4681: Argument "" isn't numeric in numeric eq (==) at /usr... X-Git-Tag: root_of_webpay_support~104 X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=commitdiff_plain;h=6ab0c477f897f423347e328929c373b73f965472 fix harmless warning, RT#4681: Argument "" isn't numeric in numeric eq (==) at /usr/local/share/perl/5.8.8/FS/cust_pkg.pm line 443. --- diff --git a/FS/FS/cust_pkg.pm b/FS/FS/cust_pkg.pm index 52148aaf1..885eef18f 100644 --- a/FS/FS/cust_pkg.pm +++ b/FS/FS/cust_pkg.pm @@ -440,7 +440,9 @@ replace methods. sub check { my $self = shift; - $self->locationnum('') if $self->locationnum == 0 || $self->locationnum == -1; + $self->locationnum('') + if defined($self->locationnum) && length($self->locationnum) + && ( $self->locationnum == 0 || $self->locationnum == -1 ); my $error = $self->ut_numbern('pkgnum')