diff --git a/src/Illuminate/Cookie/CookieJar.php b/src/Illuminate/Cookie/CookieJar.php index 7eeda646a3c1..1881bc31f1ac 100755 --- a/src/Illuminate/Cookie/CookieJar.php +++ b/src/Illuminate/Cookie/CookieJar.php @@ -158,7 +158,7 @@ public function unqueue($name) * @param string $sameSite * @return array */ - protected function getPathAndDomain($path, $domain, $secure = false, $sameSite) + protected function getPathAndDomain($path, $domain, $secure = false, $sameSite = null) { return [$path ?: $this->path, $domain ?: $this->domain, $secure ?: $this->secure, $sameSite ?: $this->sameSite]; } @@ -172,7 +172,7 @@ protected function getPathAndDomain($path, $domain, $secure = false, $sameSite) * @param string $sameSite * @return $this */ - public function setDefaultPathAndDomain($path, $domain, $secure = false, $sameSite) + public function setDefaultPathAndDomain($path, $domain, $secure = false, $sameSite = null) { list($this->path, $this->domain, $this->secure, $this->sameSite) = [$path, $domain, $secure, $sameSite]; diff --git a/tests/Cookie/CookieTest.php b/tests/Cookie/CookieTest.php index 2305d60792bf..05dd787b8423 100755 --- a/tests/Cookie/CookieTest.php +++ b/tests/Cookie/CookieTest.php @@ -44,7 +44,7 @@ public function testCookiesAreCreatedWithProperOptionsUsingDefaultPathAndDomain( $cookie = $this->getCreator(); $cookie->setDefaultPathAndDomain('/path', '/domain', true, 'lax'); $c = $cookie->make('color', 'blue'); - $this->assertEquals('blue', $c->getValue()); + $this->assertEquals('blue', $c->getValue()); $this->assertTrue($c->isSecure()); $this->assertEquals('/domain', $c->getDomain()); $this->assertEquals('/path', $c->getPath());