Update src/Module/Post/Tag/Remove.php

Co-authored-by: Hypolite Petovan <hypolite@mrpetovan.com>
This commit is contained in:
Artur Weigandt 2024-11-18 22:40:05 +01:00 committed by GitHub
parent b612180c22
commit 4faad61a7c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -78,9 +78,11 @@ class Remove extends \Friendica\BaseModule
$tag_text = Tag::getCSVByURIId($item['uri-id']);
$tags = explode(',', $tag_text);
if (!is_array($tags)) {
if ($tag_text === '') {
$this->baseUrl->redirect($returnUrl);
}
$tags = explode(',', $tag_text);
$tag_checkboxes = array_map(function ($tag_text) {
return ['tag[' . bin2hex($tag_text) . ']', BBCode::toPlaintext($tag_text)];