瀏覽代碼

[HttpFoundation] allow negative values for cookies expires timestamp

jsor 14 年之前
父節點
當前提交
fc1a8cac35
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      src/Symfony/Component/HttpFoundation/Cookie.php

+ 1 - 1
src/Symfony/Component/HttpFoundation/Cookie.php

@@ -70,7 +70,7 @@ class Cookie
         } else {
             $str .= urlencode($this->getValue());
 
-            if ($this->getExpiresTime() > 0) {
+            if ($this->getExpiresTime() !== 0) {
                 $str .= '; expires='.gmdate("D, d-M-Y H:i:s T", $this->getExpiresTime());
             }
         }