فهرست منبع

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

Johannes M. Schmitt 14 سال پیش
والد
کامیت
6bbfffb981
1فایلهای تغییر یافته به همراه4 افزوده شده و 2 حذف شده
  1. 4 2
      src/Symfony/Component/HttpFoundation/ResponseHeaderBag.php

+ 4 - 2
src/Symfony/Component/HttpFoundation/ResponseHeaderBag.php

@@ -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));
     }
 
     /**