mirror of
https://github.com/yiisoft/yii2.git
synced 2025-11-03 05:48:11 +08:00
Fixes #16068: Fixed yii\web\CookieCollection::has when an expiration param is set to 'until the browser is closed'
This commit is contained in:
committed by
Alexander Makarov
parent
9feb72dbd9
commit
ff83a13d57
@ -113,7 +113,7 @@ class CookieCollection extends BaseObject implements \IteratorAggregate, \ArrayA
|
||||
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());
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user