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

This commit is contained in:
Jordi Boggiano 2010-07-24 18:20:13 +02:00 committed by Fabien Potencier
parent fb55f7beb2
commit 02fe129013

View File

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