[RequestHandler] fixed cloning of Request instances

This commit is contained in:
Fabien Potencier 2010-04-25 13:32:45 +02:00
parent 3074f12727
commit 1bce64678f
1 changed files with 11 additions and 0 deletions

View File

@ -172,6 +172,17 @@ class Request
return $dup;
}
public function __clone()
{
$this->query = clone $this->query;
$this->request = clone $this->request;
$this->path = clone $this->path;
$this->cookies = clone $this->cookies;
$this->files = clone $this->files;
$this->server = clone $this->server;
$this->headers = clone $this->headers;
}
// Order of precedence: GET, PATH, POST, COOKIE
// Avoid using this method in controllers:
// * slow