浏览代码

[HttpFoundation] don't check twice if it's null

Jordi Boggiano 15 年之前
父节点
当前提交
02fe129013
共有 1 个文件被更改,包括 0 次插入2 次删除
  1. 0 2
      src/Symfony/Components/HttpFoundation/HeaderBag.php

+ 0 - 2
src/Symfony/Components/HttpFoundation/HeaderBag.php

@@ -207,9 +207,7 @@ class HeaderBag
                     throw new \InvalidArgumentException(sprintf('The "expires" cookie parameter is not valid.', $expires));
                 }
             }
-        }
 
-        if (null !== $expires) {
             $cookie .= '; expires='.substr(\DateTime::createFromFormat('U', $expires, new \DateTimeZone('UTC'))->format('D, d-M-Y H:i:s T'), 0, -5);
         }