Fix uninitialized value.
authorRyan C. Gordon <icculus@icculus.org>
Sat, 12 Nov 2016 23:21:26 -0500
changeset 48 e59b89413995
parent 47 8d15420dd322
child 49 ba7049943a63
Fix uninitialized value.
archive_imessage.pl
--- a/archive_imessage.pl	Sat Oct 29 20:33:14 2016 -0400
+++ b/archive_imessage.pl	Sat Nov 12 23:21:26 2016 -0500
@@ -1096,6 +1096,8 @@
         while (my @attachmentrow = $attachmentstmt->fetchrow_array()) {
             my ($fname, $mimetype) = @attachmentrow;
 
+            $mimetype = '' if (not defined $mimetype);
+
             my $is_image = $mimetype =~ /\Aimage\//;
             my $is_video = $mimetype =~ /\Avideo\//;