Don't try to munge undef values

This commit is contained in:
Eric A. Miller
2013-10-15 21:52:18 -04:00
parent 6812a60668
commit 4b1533e925
2 changed files with 3 additions and 0 deletions

View File

@@ -4236,11 +4236,13 @@ sub _munge {
my %munged;
foreach my $key ( keys %$data ) {
my $value = $data->{$key};
next unless $value;
$munged{$key} = $subref->($value);
}
return \%munged;
}
else {
return unless $data;
my $subref = $munge->{$attr};
return $subref->($data);
}