From 0b62db831cd5c8a6bbec80e9c6c40143d204d95b Mon Sep 17 00:00:00 2001 From: Rens Date: Wed, 20 Dec 2023 14:26:41 +0100 Subject: [PATCH] Check if fluent locale exists --- src/Services/ElasticaService.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Services/ElasticaService.php b/src/Services/ElasticaService.php index d4317ce..c8cf8ce 100644 --- a/src/Services/ElasticaService.php +++ b/src/Services/ElasticaService.php @@ -53,7 +53,7 @@ public function setIndex(string $indexName): self $this->extend('updateIndexName', $indexName); if (ClassInfo::exists(FluentState::class)) { - $locale = strtolower(FluentState::singleton()->getLocale()); + $locale = strtolower(FluentState::singleton()->getLocale() ?? ''); if (!str_contains($indexName, $locale)) { $indexName .= '-' . strtolower($locale);