Skip to content

Commit

Permalink
Fixed uninitialized variable warning on upload dialog screen
Browse files Browse the repository at this point in the history
  • Loading branch information
jayallen committed Jul 11, 2011
1 parent 17a8ec2 commit 8782aca
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/MT/Asset.pm
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,8 @@ sub extensions {
my ($ext) = @_;
return \@$ext unless MT->config('AssetFileTypes');

my @custom_ext = map {qr/$_/i}
split( /\s*,\s*/, MT->config('AssetFileTypes')->{$this_pkg} );
my $file_types = MT->config('AssetFileTypes')->{$this_pkg} || '';
my @custom_ext = map { qr/$_/i } split( /\s*,\s*/, $file_types );
my %seen;
my ($new_ext) = grep { ++$seen{$_} < 2 }[ @$ext, @custom_ext ];

Expand Down

0 comments on commit 8782aca

Please sign in to comment.