diff options
| author | Greg Roach <fisharebest@gmail.com> | 2018-05-31 09:45:16 +0100 |
|---|---|---|
| committer | Greg Roach <fisharebest@gmail.com> | 2018-05-31 09:57:27 +0100 |
| commit | ffe6005c11fdad01969e67c039b0d73beb0232e9 (patch) | |
| tree | 6d8df2e00473a813fef26155db549f9a969092f7 /vendor/symfony/http-foundation/Cookie.php | |
| parent | bba27599b02e0b6f90f62348bb4fa32bd74056d0 (diff) | |
| download | webtrees-ffe6005c11fdad01969e67c039b0d73beb0232e9.tar.gz webtrees-ffe6005c11fdad01969e67c039b0d73beb0232e9.tar.bz2 webtrees-ffe6005c11fdad01969e67c039b0d73beb0232e9.zip | |
Update minimum PHP version to 7.0.8 so that we can use the 3.4 LTS version of symfony
Diffstat (limited to 'vendor/symfony/http-foundation/Cookie.php')
| -rw-r--r-- | vendor/symfony/http-foundation/Cookie.php | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/vendor/symfony/http-foundation/Cookie.php b/vendor/symfony/http-foundation/Cookie.php index a2139ff6ba..d202dc6c1e 100644 --- a/vendor/symfony/http-foundation/Cookie.php +++ b/vendor/symfony/http-foundation/Cookie.php @@ -81,8 +81,6 @@ class Cookie } /** - * Constructor. - * * @param string $name The name of the cookie * @param string|null $value The value of the cookie * @param int|string|\DateTimeInterface $expire The time the cookie expires @@ -147,12 +145,12 @@ class Cookie $str = ($this->isRaw() ? $this->getName() : urlencode($this->getName())).'='; if ('' === (string) $this->getValue()) { - $str .= 'deleted; expires='.gmdate('D, d-M-Y H:i:s T', time() - 31536001).'; max-age=-31536001'; + $str .= 'deleted; expires='.gmdate('D, d-M-Y H:i:s T', time() - 31536001).'; Max-Age=0'; } else { $str .= $this->isRaw() ? $this->getValue() : rawurlencode($this->getValue()); if (0 !== $this->getExpiresTime()) { - $str .= '; expires='.gmdate('D, d-M-Y H:i:s T', $this->getExpiresTime()).'; max-age='.$this->getMaxAge(); + $str .= '; expires='.gmdate('D, d-M-Y H:i:s T', $this->getExpiresTime()).'; Max-Age='.$this->getMaxAge(); } } @@ -226,7 +224,9 @@ class Cookie */ public function getMaxAge() { - return 0 !== $this->expire ? $this->expire - time() : 0; + $maxAge = $this->expire - time(); + + return 0 >= $maxAge ? 0 : $maxAge; } /** |
