From: Hypolite Petovan Date: Mon, 9 Jan 2023 14:52:04 +0000 (-0500) Subject: Include other unique key column in condition in Model\Tag:store X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=670b5188751c391ede9c58d861b773763866f27f;p=friendica.git Include other unique key column in condition in Model\Tag:store - Address https://github.com/friendica/friendica/issues/12486#issuecomment-1372640002 --- diff --git a/src/Model/Tag.php b/src/Model/Tag.php index 368be55ddd..8509c30938 100644 --- a/src/Model/Tag.php +++ b/src/Model/Tag.php @@ -119,7 +119,7 @@ class Tag $tag = DBA::selectFirst('tag', ['name', 'type'], ['url' => $url]); if (!empty($tag)) { if ($tag['name'] != substr($name, 0, 96)) { - DBA::update('tag', ['name' => substr($name, 0, 96)], ['url' => $url]); + DBA::update('tag', ['name' => substr($name, 0, 96)], ['url' => $url, 'type' => $tag['type']]); } if (!empty($target) && ($tag['type'] != $target)) { DBA::update('tag', ['type' => $target], ['url' => $url]);