Check Content\Item::replaceTag return for false return value before using it

- Address https://github.com/friendica/friendica/issues/10169#issuecomment-835547443
- Remove unused code in Content\Item::replaceTag
This commit is contained in:
Hypolite Petovan 2021-05-31 01:35:49 -04:00
parent e42a9254c0
commit 303c9d4a54
3 changed files with 17 additions and 28 deletions

View file

@ -2196,9 +2196,7 @@ class BBCode
}
}
$success = Item::replaceTag($body, $inform, $profile_uid, $tag, $network);
if ($success['replaced']) {
if (($success = Item::replaceTag($body, $inform, $profile_uid, $tag, $network)) && $success['replaced']) {
$tagged[] = $tag;
}
}