Skip to content

Commit

Permalink
Fixes yiisoft#16068: Fixed yii\web\CookieCollection::has when an ex…
Browse files Browse the repository at this point in the history
…piration param is set to 'until the browser is closed'
  • Loading branch information
OndrejVasicek authored and samdark committed Apr 30, 2018
1 parent 9feb72d commit ff83a13
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions framework/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ Yii Framework 2 Change Log
2.0.16 under development
------------------------

- Bug #16068: Fixed `yii\web\CookieCollection::has` when an expiration param is set to 'until the browser is closed' (OndrejVasicek)
- Bug #16006: Handle case when `X-Forwarded-Host` header have multiple hosts separated with a comma (pgaultier)
- Bug #16010: Fixed `yii\filters\ContentNegotiator` behavior when GET parameters contain an array (rugabarbo)
- Bug #14660: Fixed `yii\caching\DbCache` concurrency issue when set values with the same key (rugabarbo)
Expand Down
2 changes: 1 addition & 1 deletion framework/web/CookieCollection.php
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ public function getValue($name, $defaultValue = null)
public function has($name)
{
return isset($this->_cookies[$name]) && $this->_cookies[$name]->value !== ''
&& ($this->_cookies[$name]->expire === null || $this->_cookies[$name]->expire >= time());
&& ($this->_cookies[$name]->expire === null || $this->_cookies[$name]->expire === 0 || $this->_cookies[$name]->expire >= time());
}

/**
Expand Down

0 comments on commit ff83a13

Please sign in to comment.