Skip to content

Commit

Permalink
Fix cookies with falsey values
Browse files Browse the repository at this point in the history
  • Loading branch information
staudenmeir committed Feb 28, 2019
1 parent 23a6a07 commit a645531
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 a645531

Please sign in to comment.