diff --git a/administrator/components/com_finder/src/Indexer/Helper.php b/administrator/components/com_finder/src/Indexer/Helper.php index ad79234248ad4..0e31df0ff722f 100644 --- a/administrator/components/com_finder/src/Indexer/Helper.php +++ b/administrator/components/com_finder/src/Indexer/Helper.php @@ -71,7 +71,7 @@ public static function tokenize($input, $lang, $phrase = false) $config = ComponentHelper::getParams('com_finder'); if ($config->get('language_default', '') == '') { - $defaultLang = '*'; + $defaultLang = Factory::getLanguage()->getTag(); } elseif ($config->get('language_default', '') == '-1') { $defaultLang = self::getDefaultLanguage(); } else { @@ -85,7 +85,6 @@ public static function tokenize($input, $lang, $phrase = false) */ $obj = Language::getInstance($defaultLang); $defaultLanguage = clone $obj; - $defaultLanguage->language = '*'; } if (!$multilingual || $lang == '*') { @@ -186,12 +185,14 @@ public static function stem($token, $lang) $config = ComponentHelper::getParams('com_finder'); if ($config->get('language_default', '') == '') { - $defaultStemmer = Language::getInstance('*'); + $defaultLang = Factory::getLanguage()->getTag(); } elseif ($config->get('language_default', '') == '-1') { - $defaultStemmer = Language::getInstance(self::getDefaultLanguage()); + $defaultLang = self::getDefaultLanguage(); } else { - $defaultStemmer = Language::getInstance($config->get('language_default')); + $defaultLang = $config->get('language_default'); } + + $defaultStemmer = Language::getInstance($defaultLang); } if (!$multilingual || $lang == '*') {