made Cookie stringification more robust
This commit is contained in:
parent
fa24749537
commit
d014dacce3
@ -96,7 +96,7 @@ class Cookie
|
|||||||
throw new \UnexpectedValueException(sprintf('The cookie expiration time "%s" is not valid.'), $this->expires);
|
throw new \UnexpectedValueException(sprintf('The cookie expiration time "%s" is not valid.'), $this->expires);
|
||||||
}
|
}
|
||||||
|
|
||||||
$cookie .= '; expires='.substr($dateTime->format(self::$dateFormats[0]), 0, -5);
|
$cookie .= '; expires='.str_replace('+0000', '', $dateTime->format(self::$dateFormats[0]));
|
||||||
}
|
}
|
||||||
|
|
||||||
if ('' !== $this->domain) {
|
if ('' !== $this->domain) {
|
||||||
|
@ -304,7 +304,7 @@ class RequestDataCollector extends DataCollector implements EventSubscriberInter
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$cookie .= '; expires='.substr(\DateTime::createFromFormat('U', $expires, new \DateTimeZone('UTC'))->format('D, d-M-Y H:i:s T'), 0, -5);
|
$cookie .= '; expires='.str_replace('+0000', '', \DateTime::createFromFormat('U', $expires, new \DateTimeZone('GMT'))->format('D, d-M-Y H:i:s T'));
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($domain) {
|
if ($domain) {
|
||||||
|
Reference in New Issue
Block a user