From: Michael Date: Tue, 19 Apr 2022 06:16:44 +0000 (+0000) Subject: Fix: The language detection only searched for farsi X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=0380a3e216dde2a0680baf802f21882f02e46802;p=friendica.git Fix: The language detection only searched for farsi --- diff --git a/src/Model/Item.php b/src/Model/Item.php index 09890ab2c9..34f7e0d8b8 100644 --- a/src/Model/Item.php +++ b/src/Model/Item.php @@ -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);