Skip to content

Commit

Permalink
Merge branch '6.4' into 7.0
Browse files Browse the repository at this point in the history
* 6.4:
  More short closures + isset instead of null checks + etc.
  • Loading branch information
nicolas-grekas committed Jul 27, 2023
2 parents f49be6a + a747429 commit d05a889
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions Cookie.php
Original file line number Diff line number Diff line change
Expand Up @@ -61,11 +61,11 @@ class Cookie
public function __construct(string $name, ?string $value, string $expires = null, string $path = null, string $domain = '', bool $secure = false, bool $httponly = true, bool $encodedValue = false, string $samesite = null)
{
if ($encodedValue) {
$this->value = urldecode($value);
$this->rawValue = $value;
$this->rawValue = $value ?? '';
$this->value = urldecode($this->rawValue);
} else {
$this->value = $value;
$this->rawValue = rawurlencode($value ?? '');
$this->value = $value ?? '';
$this->rawValue = rawurlencode($this->value);
}
$this->name = $name;
$this->path = empty($path) ? '/' : $path;
Expand Down

0 comments on commit d05a889

Please sign in to comment.