29
0
mirror of https://github.com/joomla/joomla-cms.git synced 2024-06-25 06:42:53 +00:00

[4.4] Finder: Fixing language of token (#42693)

* Finder: Fixing language of token

* Update administrator/components/com_finder/src/Indexer/Token.php

Co-authored-by: Brian Teeman <brian@teeman.net>

* Update Token.php

---------

Co-authored-by: Brian Teeman <brian@teeman.net>
This commit is contained in:
Hannes Papenberg 2024-02-22 10:55:00 +01:00 committed by GitHub
parent b0663caf26
commit ce13d13ec6
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -144,8 +144,9 @@ class Token
// Tokens can be a single word or an array of words representing a phrase.
if (is_array($term)) {
// Populate the token instance.
$langs = array_fill(0, count($term), $lang);
$this->term = implode($spacer, $term);
$this->stem = implode($spacer, array_map([Helper::class, 'stem'], $term, [$lang]));
$this->stem = implode($spacer, array_map([Helper::class, 'stem'], $term, $langs));
$this->numeric = false;
$this->common = false;
$this->phrase = true;