Skip to content

Commit

Permalink
Merge pull request #617 from staudenmeir/cookie
Browse files Browse the repository at this point in the history
[5.0] Fix cookies with falsey values
  • Loading branch information
taylorotwell authored Feb 28, 2019
2 parents 23a6a07 + a645531 commit 3f6312a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Concerns/InteractsWithCookies.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ trait InteractsWithCookies
*/
public function cookie($name, $value = null, $expiry = null, array $options = [])
{
if ($value) {
if (! is_null($value)) {
return $this->addCookie($name, $value, $expiry, $options);
}

Expand All @@ -37,7 +37,7 @@ public function cookie($name, $value = null, $expiry = null, array $options = []
*/
public function plainCookie($name, $value = null, $expiry = null, array $options = [])
{
if ($value) {
if (! is_null($value)) {
return $this->addCookie($name, $value, $expiry, $options, false);
}

Expand Down

0 comments on commit 3f6312a

Please sign in to comment.