]> git.ipfire.org Git - thirdparty/bugzilla.git/commitdiff
Bug 334617: importxml.pl crashes when importing bugs having attachments from version...
authorlpsolit%gmail.com <>
Thu, 20 Apr 2006 05:04:06 +0000 (05:04 +0000)
committerlpsolit%gmail.com <>
Thu, 20 Apr 2006 05:04:06 +0000 (05:04 +0000)
importxml.pl

index e3a1169216fb1c8aeb50eb237fab1a22fd43f2b1..2beb75927856bb927a29bdce6c68be50e5865473 100755 (executable)
@@ -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