Parcourir la source

[HttpFoundation] allow negative values for cookies expires timestamp

jsor il y a 14 ans
Parent
commit
fc1a8cac35
1 fichiers modifiés avec 1 ajouts et 1 suppressions
  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());
             }
         }