diff --git a/Classes/Controller/JsonApiCollectionCommandController.php b/Classes/Controller/JsonApiCollectionCommandController.php index 20350ec..d7bbd7b 100644 --- a/Classes/Controller/JsonApiCollectionCommandController.php +++ b/Classes/Controller/JsonApiCollectionCommandController.php @@ -41,9 +41,9 @@ public function read(ServerRequestInterface $request): ResponseInterface $this->parseFieldsets($queryParams); $pageParams = $queryParams['page'] ?? []; - $currentCursor = $pageParams['cursor']; - $previousCursor = $pageParams['previous']; - $limit = $pageParams['limit'] ? (int) $pageParams['limit'] : 10; + $currentCursor = $pageParams['cursor'] ?? null; + $previousCursor = $pageParams['previous'] ?? null; + $limit = isset($pageParams['limit']) ? (int) $pageParams['limit'] : 10; $filters = isset($queryParams['filter']) && \is_array($queryParams['filter']) ? $queryParams['filter'] : []; diff --git a/Classes/Controller/JsonApiItemCommandController.php b/Classes/Controller/JsonApiItemCommandController.php index 6e55b24..d2ebf9a 100644 --- a/Classes/Controller/JsonApiItemCommandController.php +++ b/Classes/Controller/JsonApiItemCommandController.php @@ -53,7 +53,8 @@ public function read(ServerRequestInterface $request): ResponseInterface $resourceIdentifier = \urldecode($request->getAttribute('variables')['id'] ?: ''); - $data = $this->fetchAndTransformData($resourceIdentifier, $request->getAttributes()['context']); + $context = $request->getAttributes()['context'] ?? null; + $data = $this->fetchAndTransformData($resourceIdentifier, $context); if (null === $data) { return new JsonResponse($data, 404, ['Content-Type' => 'application/vnd.api+json; charset=utf-8']); diff --git a/Classes/IncludeHandler/TcaResourceIncludeHandler.php b/Classes/IncludeHandler/TcaResourceIncludeHandler.php index fd6c145..389bd87 100644 --- a/Classes/IncludeHandler/TcaResourceIncludeHandler.php +++ b/Classes/IncludeHandler/TcaResourceIncludeHandler.php @@ -125,7 +125,7 @@ protected function buildTcaIncludes($tableName): array break; case 'group': - if ('db' === $columnConfig['internal_type'] && !empty($columnConfig['allowed']) && false === \strpos($columnConfig['allowed'], ',')) { + if ('db' === ($columnConfig['internal_type'] ?? null) && !empty($columnConfig['allowed']) && false === \strpos($columnConfig['allowed'], ',')) { return \array_merge($columnConfig, [static::REFERENCE_TABLE_NAME => GeneralUtility::trimExplode(',', $columnConfig['allowed'], true)]); }