Skip to content

Commit

Permalink
Merge pull request #10 from Codeception/fix-set-cookie
Browse files Browse the repository at this point in the history
setCookie: don't add domain to cookie unless explicitly specified.
  • Loading branch information
Naktibalda authored Mar 23, 2020
2 parents 0cbb034 + edef71c commit 9ee5410
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions src/Codeception/Module/WebDriver.php
Original file line number Diff line number Diff line change
Expand Up @@ -840,12 +840,7 @@ public function setCookie($cookie, $value, array $params = [], $showDebug = true
if (isset($params['expires'])) { // PhpBrowser compatibility
$params['expiry'] = $params['expires'];
}
if (!isset($params['domain'])) {
$urlParts = parse_url($this->config['url']);
if (isset($urlParts['host'])) {
$params['domain'] = $urlParts['host'];
}
}

// #5401 Supply defaults, otherwise chromedriver 2.46 complains.
$defaults = [
'path' => '/',
Expand Down

0 comments on commit 9ee5410

Please sign in to comment.