8000 [RequestHandler] fixed cloning of Request instances · Arief57/symfony@1bce646 · GitHub
[go: up one dir, main page]

Skip to content

Commit 1bce646

Browse files
committed
[RequestHandler] fixed cloning of Request instances
1 parent 3074f12 commit 1bce646

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

src/Symfony/Components/RequestHandler/Request.php

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -172,6 +172,17 @@ public function duplicate(array $query = null, array $request = null, array $pat
172172
return $dup;
173173
}
174174

175+
public function __clone()
176+
{
177+
$this->query = clone $this->query;
178+
$this->request = clone $this->request;
179+
$this->path = clone $this->path;
180+
$this->cookies = clone $this->cookies;
181+
$this->files = clone $this->files;
182+
$this->server = clone $this->server;
183+
$this->headers = clone $this->headers;
184+
}
185+
175186
// Order of precedence: GET, PATH, POST, COOKIE
176187
// Avoid using this method in controllers:
177188
// * slow

0 commit comments

Comments
 (0)
0