diff --git a/ext/auto_tagger/main.php b/ext/auto_tagger/main.php index c43177aa2..8203e1de6 100644 --- a/ext/auto_tagger/main.php +++ b/ext/auto_tagger/main.php @@ -171,9 +171,11 @@ public function onTagSet(TagSetEvent $event): void } error_log("auto-tagger: checking results for metatags..."); # need to check tags again for metatags + $tmp_new_tags = []; + $tmp_metatags = []; foreach ($results as $r) { if ((!str_contains($r, ':')) && (!str_contains($r, '='))) { - $event->new_tags[] = $r; + $tmp_new_tags[] = $r; error_log("auto-tagger: ".$r." is definitely a normal tag."); continue; } @@ -182,13 +184,15 @@ public function onTagSet(TagSetEvent $event): void //seperate tags from metatags if (!$ttpe->metatag) { - $event->new_tags[] = $r; + $tmp_new_tags[] = $r; error_log("auto-tagger: ".$r." is a normal tag."); } else { error_log("auto-tagger: ".$r." is a meta tag!"); - $event->metatags[] = $r; + $tmp_metatags[] = $r; } } + $event->new_tags = $tmp_new_tags; + $event->metags = $tmp_metatags; } }