Fix errors in langfilter addon

This commit is contained in:
Art4 2024-11-30 19:35:19 +00:00
parent 04afbe36e3
commit fcec1a3d83

View file

@ -7,7 +7,6 @@
* License: MIT
*/
use Friendica\App;
use Friendica\Content\Text\BBCode;
use Friendica\Core\Hook;
use Friendica\Core\Renderer;
@ -148,6 +147,8 @@ function langfilter_prepare_body_content_filter(&$hook_data)
$iso639 = new Matriphe\ISO639\ISO639;
$confidence = null;
// Extract the language of the post
if (!empty($hook_data['item']['language'])) {
$languages = json_decode($hook_data['item']['language'], true);