diff options
author | lpsolit%gmail.com <> | 2006-04-20 06:47:25 +0200 |
---|---|---|
committer | lpsolit%gmail.com <> | 2006-04-20 06:47:25 +0200 |
commit | 9fef4d440062fb2a5080c1cf79f847dc587b5459 (patch) | |
tree | fbe18fb46f757e3e8f7a180e106e85854199d17d | |
parent | 794419cacad6de57a10228a4f839a4ed5c44d9ed (diff) | |
download | bugzilla-9fef4d440062fb2a5080c1cf79f847dc587b5459.tar.gz bugzilla-9fef4d440062fb2a5080c1cf79f847dc587b5459.tar.xz |
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
-rwxr-xr-x | importxml.pl | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/importxml.pl b/importxml.pl index 47f886c1c..59bea430c 100755 --- a/importxml.pl +++ b/importxml.pl @@ -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 |