API2Client: avoid perl warning

This commit is contained in:
Dietmar Maurer 2016-11-13 09:24:31 +01:00
parent fbd60cfd4c
commit 7e25caf7c3

View File

@ -139,7 +139,7 @@ sub call {
return if $ct !~ m|application/json|;
my $res = from_json($response->decoded_content, {utf8 => 1, allow_nonref => 1});
if (my $errors = $res->{errors}) {
foreach my $key (keys $errors) {
foreach my $key (keys %$errors) {
my $m = $errors->{$key};
chomp($m);
$m =~s/\n/ -- /g;