浏览代码

For php8.4

walkor 11 月之前
父节点
当前提交
e25dd32e48
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      src/Protocols/Http/Response.php

+ 1 - 1
src/Protocols/Http/Response.php

@@ -335,7 +335,7 @@ class Response implements Stringable
      * @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)