From 78b5a72c727665dd1d7faf19b4895112a286c5c9 Mon Sep 17 00:00:00 2001 From: Marcel Tams <17073000+amtee@users.noreply.github.com> Date: Mon, 13 Feb 2023 11:44:29 +0100 Subject: [PATCH] Bugfix: Should throw error if indexname is not set It is common practice to use an ENV variable to set the index name. If it's not present, $name is not empty string, but false. --- Classes/ElasticSearchClient.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Classes/ElasticSearchClient.php b/Classes/ElasticSearchClient.php index a8ce9105..cf9dfc15 100644 --- a/Classes/ElasticSearchClient.php +++ b/Classes/ElasticSearchClient.php @@ -129,7 +129,7 @@ public function getIndexName(): string public function getIndexNamePrefix(): string { $name = trim($this->indexNameStrategy->get()); - if ($name === '') { + if ($name === '' || $name == false) { throw new ConfigurationException('IndexNameStrategy ' . get_class($this->indexNameStrategy) . ' returned an empty index name', 1582538800); }