MT#8729 Fix valid_media_type regex

dies on undef value
agranig/webphone
Gerhard Jungwirth 11 years ago
parent 535a44fa6d
commit 49431fc9a2

@ -199,7 +199,7 @@ sub valid_media_type {
my ($self, $c, $media_type) = @_;
my $ctype = $c->request->header('Content-Type');
$ctype =~ s/;\s+boundary.+$//;
$ctype =~ s/;\s+boundary.+$// if $ctype;
my $type;
if(ref $media_type eq "ARRAY") {
$type = join ' or ', @{ $media_type };

Loading…
Cancel
Save