Skip to content

Commit 69d3ba7

Browse files
author
Matthias Molitor
committed
ensure that the legacy app is dispatched only once per web request
1 parent b85a6e7 commit 69d3ba7

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

Integration/LegacyApplication.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,11 @@ public function setLegacyKernel(HttpKernelInterface $kernel)
2828

2929
public function handle(Request $request, $type = HttpKernelInterface::MASTER_REQUEST, $catch = true)
3030
{
31-
return $this->response = $this->legacyKernel->handle($request, $type, $catch);
31+
if ($this->response !== null) {
32+
// Dispatch legacy application only once.
33+
$this->response = $this->legacyKernel->handle($request, $type, $catch);
34+
}
35+
return $this->response;
3236
}
3337

3438
public function isDispatched()

0 commit comments

Comments
 (0)