Commit 9fef4d44 authored by lpsolit%gmail.com's avatar lpsolit%gmail.com

Bug 334617: importxml.pl crashes when importing bugs having attachments from…

Bug 334617: importxml.pl crashes when importing bugs having attachments from version 2.20 or older - Patch by Frédéric Buclin <LpSolit@gmail.com> r=ghendricks a=myk
parent 794419ca
......@@ -397,7 +397,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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment