]> git.mxchange.org Git - friendica.git/commitdiff
work with PSR-7 Request in App::runFrontend()
authorArt4 <art4@wlabs.de>
Thu, 26 Dec 2024 11:33:00 +0000 (11:33 +0000)
committerArt4 <art4@wlabs.de>
Thu, 26 Dec 2024 11:33:00 +0000 (11:33 +0000)
src/App.php

index d4f3a35837f92f19b1c6ba0edf38c6d366f679e0..ac3762e044f6656653dc143645340b6d492b0272 100644 (file)
@@ -177,7 +177,7 @@ class App
                        $this->container->create(ModuleHTTPException::class),
                        new HTTPInputData($request->getServerParams()),
                        $start_time,
-                       $request->getServerParams()
+                       $request
                );
        }
 
@@ -549,8 +549,10 @@ class App
                ModuleHTTPException $httpException,
                HTTPInputData $httpInput,
                float $start_time,
-               array $server
+               ServerRequestInterface $request
        ) {
+               $server = $request->getServerParams();
+
                $requeststring = ($server['REQUEST_METHOD'] ?? '') . ' ' . ($server['REQUEST_URI'] ?? '') . ' ' . ($server['SERVER_PROTOCOL'] ?? '');
                $this->logger->debug('Request received', ['address' => $server['REMOTE_ADDR'] ?? '', 'request' => $requeststring, 'referer' => $server['HTTP_REFERER'] ?? '', 'user-agent' => $server['HTTP_USER_AGENT'] ?? '']);
                $request_start = microtime(true);