fix(autoTag): handle shares without link

This commit is contained in:
SansGuidon 2024-12-16 13:10:26 +00:00
parent 7c1fc7e300
commit 021ec892ba

View File

@ -177,6 +177,9 @@ function filter_and_limit_tags(array $tagScores, int $minScore = 2, int $maxTags
function apply_auto_tags(array $data, ConfigManager $conf): array function apply_auto_tags(array $data, ConfigManager $conf): array
{ {
if (empty($data['link']['url'])) {
return $data;
}
$keywordsToTags = $conf->get('plugins.AUTO_TAG_KEYWORDS', []); $keywordsToTags = $conf->get('plugins.AUTO_TAG_KEYWORDS', []);
$pageContent = fetch_page_content($data['link']['url']); $pageContent = fetch_page_content($data['link']['url']);