From: ivan Date: Mon, 6 Dec 2004 08:09:03 +0000 (+0000) Subject: fix harmless "Use of uninitialized value in length" warning in latex escapes X-Git-Tag: BEFORE_FINAL_MASONIZE~821 X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=commitdiff_plain;h=b5ca5dd85a6b1eacdc0888aedecadb716e625ec3 fix harmless "Use of uninitialized value in length" warning in latex escapes --- diff --git a/FS/FS/cust_bill.pm b/FS/FS/cust_bill.pm index 2755be0ae..5b5d3765d 100644 --- a/FS/FS/cust_bill.pm +++ b/FS/FS/cust_bill.pm @@ -1256,7 +1256,7 @@ sub print_pdf { sub _latex_escape { my $value = shift; - $value =~ s/([#\$%&~_\^{}])( )?/"\\$1". ( length($2) ? "\\$2" : '' )/ge; + $value =~ s/([#\$%&~_\^{}])( )?/"\\$1". ( ( defined($2) && length($2) ) ? "\\$2" : '' )/ge; $value; }