diff --git a/lib/Alchemy/Phrasea/SearchEngine/Elastic/RecordHelper.php b/lib/Alchemy/Phrasea/SearchEngine/Elastic/RecordHelper.php index d5a30c40be..85fb81dea2 100644 --- a/lib/Alchemy/Phrasea/SearchEngine/Elastic/RecordHelper.php +++ b/lib/Alchemy/Phrasea/SearchEngine/Elastic/RecordHelper.php @@ -32,7 +32,16 @@ class RecordHelper public function getUniqueCollectionId($databoxId, $collectionId) { - return igorw\get_in($this->collectionMap(), [$databoxId, $collectionId]); + $col = $this->collectionMap(); + + if (isset($col[$databoxId])) { + $index = array_search($collectionId, $col[$databoxId]); + if ($index !== false) { + return (int) $index; + } + } + + return null; } private function collectionMap()