From 1bce64678f7f1e26c6594f880dc0f57d6e5d4d58 Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Sun, 25 Apr 2010 13:32:45 +0200 Subject: [PATCH] [RequestHandler] fixed cloning of Request instances --- src/Symfony/Components/RequestHandler/Request.php | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/Symfony/Components/RequestHandler/Request.php b/src/Symfony/Components/RequestHandler/Request.php index cbde801bf3..42eab5c3b7 100644 --- a/src/Symfony/Components/RequestHandler/Request.php +++ b/src/Symfony/Components/RequestHandler/Request.php @@ -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