added path, and domain to clearCookie() in accordance with RFC 2109, and RFC 2965

This commit is contained in:
Johannes M. Schmitt 2011-01-25 14:41:09 +01:00 committed by Fabien Potencier
parent 90c16c7350
commit 6bbfffb981

View File

@ -79,11 +79,13 @@ class ResponseHeaderBag extends HeaderBag
* Clears a cookie in the browser
*
* @param string $name
* @param string $path
* @param string $domain
* @return void
*/
public function clearCookie($name)
public function clearCookie($name, $path = null, $domain = null)
{
$this->setCookie(new Cookie($name, null, time() - 86400));
$this->setCookie(new Cookie($name, null, time() - 86400, $path, $domain));
}
/**