From e25dd32e487ccc21308fa4c33c4e8399d7285d0e Mon Sep 17 00:00:00 2001 From: walkor Date: Sun, 24 Nov 2024 20:26:22 +0800 Subject: [PATCH] For php8.4 --- src/Protocols/Http/Response.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Protocols/Http/Response.php b/src/Protocols/Http/Response.php index 2f73e30a..a54c1843 100644 --- a/src/Protocols/Http/Response.php +++ b/src/Protocols/Http/Response.php @@ -335,7 +335,7 @@ public function withFile(string $file, int $offset = 0, int $length = 0): static * @param string $sameSite * @return $this */ - public function cookie(string $name, string $value = '', int $maxAge = null, string $path = '', string $domain = '', bool $secure = false, bool $httpOnly = false, string $sameSite = ''): static + public function cookie(string $name, string $value = '', ?int $maxAge = null, string $path = '', string $domain = '', bool $secure = false, bool $httpOnly = false, string $sameSite = ''): static { $this->headers['Set-Cookie'][] = $name . '=' . rawurlencode($value) . (empty($domain) ? '' : '; Domain=' . $domain)