]> git.mxchange.org Git - friendica-addons.git/commitdiff
Fix errors in langfilter addon
authorArt4 <art4@wlabs.de>
Sat, 30 Nov 2024 19:35:19 +0000 (19:35 +0000)
committerArt4 <art4@wlabs.de>
Sat, 30 Nov 2024 19:35:19 +0000 (19:35 +0000)
langfilter/langfilter.php

index e5efa8fbc6e972cf263eee35c07b1984f65783db..2bf986f09f061c74c9e67dd0ae4dbb9a62634562 100644 (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);