[HttpFoundation] don't check twice if it's null
This commit is contained in:
parent
fb55f7beb2
commit
02fe129013
@ -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);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user