diff --git a/Classes/Domain/Model/Index.php b/Classes/Domain/Model/Index.php index 7b2f068..7923afb 100644 --- a/Classes/Domain/Model/Index.php +++ b/Classes/Domain/Model/Index.php @@ -192,7 +192,7 @@ public function request(string $method, string $path = null, array $arguments = public function create(): void { $indexConfiguration = $this->getConfiguration() ?? []; - $indexCreateObject = is_array($indexConfiguration) ? array_filter($indexConfiguration, static fn($key) => in_array($key, self::$allowedIndexCreateKeys, true), ARRAY_FILTER_USE_KEY) : []; + $indexCreateObject = array_filter($indexConfiguration, static fn($key) => in_array($key, self::$allowedIndexCreateKeys, true), ARRAY_FILTER_USE_KEY); $this->request('PUT', null, [], $this->encodeRequestBody($indexCreateObject)); } @@ -301,7 +301,7 @@ private function prefixName(): string private function encodeRequestBody(array $content): string { - if (empty($content)) { + if ($content === []) { return ''; }