getQueryParams()['id'] ?? $request->getParsedBody()['id'] ?? 0); if (!MathUtility::canBeInterpretedAsInteger($pageId)) { // @todo: The "filelist" module abuses "id" to carry a storage like "1:/" around. This // should be changed. To *always* have a site attribute attached to the request, // we for now resolve to zero here, leading to NullSite object. // Change "filelist" module to no longer abuse "id" GET argument and throw an // exception here if $pageUid can not be resolved to an int. $pageId = 0; } $pageId = (int)$pageId; $rootLine = null; if ($pageId > 0) { $rootLine = BackendUtility::BEgetRootLine($pageId); } $site = $this->siteMatcher->matchByPageId($pageId, $rootLine); $request = $request->withAttribute('site', $site); return $handler->handle($request); } }