Subject: | Warning appears when Content-Id is not present in MIME attachment |
Date: | Fri, 01 Nov 2013 17:09:58 +0200 |
To: | bug-SOAP-Lite [...] rt.cpan.org |
From: | Kirill Bogdanenko <Kirill.Bogdanenko [...] portaone.com> |
Hello,
I'm using SOAP::Lite v1.06 and I've encountered an issue:
When you send MIME (part) attachment without Content-Id attribute (but
with Content-Location attribute)
you get a warning:
Show quoted text
> Use of uninitialized value $id in substitution (s///) at
/usr/share/perl5/vendor_perl/SOAP/Lite.pm line 2127.
This issue happens due to this code:
$id =~ s/^<([^>]*)>$/$1/; # string any leading and trailing
brackets
$self->ids->{$id} = $part if $id;
Which actually should be like:
if ($id) {
$id =~ s/^<([^>]*)>$/$1/; # strip any leading and trailing
brackets
$self->ids->{$id} = $part;
}
--
Kirill Bogdanenko
PortaOne, Inc., Software Engineer
Tel: +1-866-SIP VOIP (+1 866 747 8647) ext. 7644
PortaOne - Billing & Softswitch Solutions Company
Visit our Website: http://www.portaone.com