From 6ab0c477f897f423347e328929c373b73f965472 Mon Sep 17 00:00:00 2001 From: ivan Date: Mon, 26 Jan 2009 01:07:19 +0000 Subject: [PATCH] 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. --- FS/FS/cust_pkg.pm | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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') -- 2.11.0