Skip to content

Commit 9a87bc7

Browse files
minor #39246 [HttpFoundation] Throws cleanup (kick-the-bucket)
This PR was merged into the 4.4 branch. Discussion ---------- [HttpFoundation] Throws cleanup | Q | A | ------------- | --- | Branch? | 4.4 | Bug fix? | yes | New feature? | no | Deprecations? | no | Tickets | | License | MIT | Doc PR | The actual throw statements have been removed years ago, but the annotations stayed. Such annotations fool static analysis tools to trigger false positives for unhandled exceptions. Commits ------- 8b9b62048c Remove unused @throws tags and handling of never thrown exceptions
2 parents 9a66282 + 2292c59 commit 9a87bc7

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

DataCollector/RequestDataCollector.php

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -53,12 +53,7 @@ public function collect(Request $request, Response $response/*, \Throwable $exce
5353
}
5454
}
5555

56-
try {
57-
$content = $request->getContent();
58-
} catch (\LogicException $e) {
59-
// the user already got the request content as a resource
60-
$content = false;
61-
}
56+
$content = $request->getContent();
6257

6358
$sessionMetadata = [];
6459
$sessionAttributes = [];

0 commit comments

Comments
 (0)