From 1db57775bae5eefe24c03ad1d54e0fa34149c39d Mon Sep 17 00:00:00 2001 From: jakubvojacek Date: Thu, 9 Mar 2023 10:34:00 +0100 Subject: [PATCH] Fix netteConnector with phpunit10 (#41) --- src/Connector/NetteConnector.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/Connector/NetteConnector.php b/src/Connector/NetteConnector.php index a4af8a1..0dd0643 100644 --- a/src/Connector/NetteConnector.php +++ b/src/Connector/NetteConnector.php @@ -31,10 +31,12 @@ public function setContainerAccessor(callable $containerAccessor): void */ public function doRequest($request): Response { + $phpSelf = $_SERVER['PHP_SELF']; $_COOKIE = $request->getCookies(); $_SERVER = $request->getServer(); $_FILES = $request->getFiles(); + $_SERVER['PHP_SELF'] = $phpSelf; $_SERVER['REQUEST_METHOD'] = $method = strtoupper($request->getMethod()); $_SERVER['REQUEST_URI'] = str_replace('http://localhost', '', $request->getUri()); $_SERVER['REMOTE_ADDR'] = '127.0.0.1';