]> git.mxchange.org Git - friendica.git/commitdiff
Fix: The language detection only searched for farsi
authorMichael <heluecht@pirati.ca>
Tue, 19 Apr 2022 06:16:44 +0000 (06:16 +0000)
committerMichael <heluecht@pirati.ca>
Tue, 19 Apr 2022 06:16:44 +0000 (06:16 +0000)
src/Model/Item.php

index 09890ab2c9e738b66c3555eb01a55cf20c84737c..34f7e0d8b8959e61e80d4d99def20eb1461e5a23 100644 (file)
@@ -1751,7 +1751,7 @@ class Item
                // which point it will be automatically available through `getAvailableLanguages()` and this should be removed.
                $availableLanguages['fa'] = 'fa';
 
-               $ld = new Language($availableLanguages);
+               $ld = new Language(array_keys($availableLanguages));
                $languages = $ld->detect($naked_body)->limit(0, 3)->close();
                if (is_array($languages)) {
                        return json_encode($languages);