Skip to content

Commit 7e6a92d

Browse files
committed
Fixed deprecation warnings about passing null as parameter
1 parent 4c8b42b commit 7e6a92d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Cookie.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ class Cookie
4646
* Sets a cookie.
4747
*
4848
* @param string $name The cookie name
49-
* @param string $value The value of the cookie
49+
* @param string|null $value The value of the cookie
5050
* @param string|null $expires The time the cookie expires
5151
* @param string|null $path The path on the server in which the cookie will be available on
5252
* @param string $domain The domain that the cookie is available
@@ -62,7 +62,7 @@ public function __construct(string $name, ?string $value, string $expires = null
6262
$this->rawValue = $value;
6363
} else {
6464
$this->value = $value;
65-
$this->rawValue = rawurlencode($value);
65+
$this->rawValue = rawurlencode($value ?? '');
6666
}
6767
$this->name = $name;
6868
$this->path = empty($path) ? '/' : $path;

0 commit comments

Comments
 (0)