Skip to content

Commit

Permalink
Merge pull request ledgersmb#8567 from ehuelsmann/fix/master/shadowed…
Browse files Browse the repository at this point in the history
…-variable-warning

Fix warning of shadowed variable
  • Loading branch information
ehuelsmann authored Jan 3, 2025
2 parents 8f39291 + 1c87119 commit 6e98ab1
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/LedgerSMB/Router.pm
Original file line number Diff line number Diff line change
Expand Up @@ -516,9 +516,9 @@ sub api {
[ 'Not found' ] ];
}

$has_body = reftype $triplet->[2] ne 'ARRAY'
my $has_return_body = reftype $triplet->[2] ne 'ARRAY'
or Plack::Util::content_length($triplet->[2]);
my $content_type =
my $return_content_type =
((Plack::Util::header_get($triplet->[1], 'Content-Type') // '')
=~ s/;(.*)$//r);
($result, $errors, $warnings) =
Expand All @@ -530,7 +530,7 @@ sub api {
header => { $triplet->[1]->@* },
path => $params,
query => $req->query_parameters->as_hashref_mixed,
body => [ $has_body, $content_type, $triplet->[2] ]
body => [ $has_return_body, $return_content_type, $triplet->[2] ]
});
return _error($req, HTTP_INTERNAL_SERVER_ERROR, [], @$errors)
if scalar(@$errors) > 0;
Expand Down

0 comments on commit 6e98ab1

Please sign in to comment.