Skip to content

Commit 592c8fe

Browse files
committed
minor symfony#24495 Remove unnecessary condition; (243083df)
This PR was merged into the 4.0-dev branch. Discussion ---------- Remove unnecessary condition; | Q | A | ------------- | --- | Branch? | master | Bug fix? | no | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | --- | License | MIT | Doc PR | --- Commits ------- f09f0ae Remove unnecessary condition;
2 parents 473911b + f09f0ae commit 592c8fe

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

src/Symfony/Component/HttpKernel/HttpKernel.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -157,9 +157,7 @@ private function handleRaw(Request $request, int $type = self::MASTER_REQUEST)
157157

158158
if ($event->hasResponse()) {
159159
$response = $event->getResponse();
160-
}
161-
162-
if (!$response instanceof Response) {
160+
} else {
163161
$msg = sprintf('The controller must return a response (%s given).', $this->varToString($response));
164162

165163
// the user may have forgotten to return something

0 commit comments

Comments
 (0)