From fbac514ad754aad8b05475c3106023664171ea0c Mon Sep 17 00:00:00 2001 From: "lpsolit%gmail.com" <> Date: Thu, 20 Apr 2006 05:04:06 +0000 Subject: [PATCH] =?utf8?q?Bug=20334617:=20importxml.pl=20crashes=20when=20?= =?utf8?q?importing=20bugs=20having=20attachments=20from=20version=202.20?= =?utf8?q?=20or=20older=20-=20Patch=20by=20Fr=C3=A9d=C3=A9ric=20Buclin=20=20r=3Dghendricks=20a=3Dmyk?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- importxml.pl | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/importxml.pl b/importxml.pl index e3a1169216..2beb759278 100755 --- a/importxml.pl +++ b/importxml.pl @@ -398,7 +398,9 @@ sub process_attachment() { $attachment{'isobsolete'} = $attach->{'att'}->{'isobsolete'} || 0; $attachment{'isprivate'} = $attach->{'att'}->{'isprivate'} || 0; $attachment{'filename'} = $attach->field('filename') || "file"; - if ( defined( $attach->first_child('data')->{'att'}->{'encoding'} ) + # Attachment data is not exported in versions 2.20 and older. + if (defined $attach->first_child('data') + && defined $attach->first_child('data')->{'att'}->{'encoding'} && $attach->first_child('data')->{'att'}->{'encoding'} =~ /base64/ ) { # decode the base64 -- 2.47.2