Specify `null` for the superglobals in ServerRequestFactory::fromGlobals()
authorTim Düsterhus <duesterhus@woltlab.com>
Thu, 30 Jun 2022 09:44:51 +0000 (11:44 +0200)
committerTim Düsterhus <duesterhus@woltlab.com>
Thu, 30 Jun 2022 09:44:51 +0000 (11:44 +0200)
Diactoros does not use `$_COOKIE` internally, but parses the `Cookie` header
instead, because PHP mangles cookie names when parsing into `$_COOKIE`.

wcfsetup/install/files/lib/system/request/RequestHandler.class.php

index 7e08c2efd9f1d37c42fae399e950e676af6f49ca..4ed1d04ce18e0817a9159aab9a17d304c87847b8 100644 (file)
@@ -74,11 +74,11 @@ final class RequestHandler extends SingletonFactory
             }
 
             $psrRequest = ServerRequestFactory::fromGlobals(
-                $_SERVER,
-                $_GET,
-                $_POST,
-                $_COOKIE,
-                $_FILES,
+                null, // $_SERVER
+                null, // $_GET
+                null, // $_POST
+                null, // $_COOKIE
+                null, // $_FILES
                 FilterUsingXForwardedHeaders::trustProxies(
                     ['*'],
                     [FilterUsingXForwardedHeaders::HEADER_PROTO]