Skip to content

Commit

Permalink
Ensure provided plink to BBCode::getShareOpeningTag is always a strin…
Browse files Browse the repository at this point in the history
…g in Protocol\Diaspora

- The database field item.plink accepts NULL values
- Address friendica#9747 (comment)
  • Loading branch information
MrPetovan committed Jan 11, 2021
1 parent 56fbd00 commit 488b928
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/Protocol/Diaspora.php
Expand Up @@ -2326,8 +2326,6 @@ public static function originalItem($guid, $orig_author)
}

if ($stored) {
$fields = ['body', 'title', 'app', 'created', 'object-type', 'uri', 'guid',
'author-name', 'author-link', 'author-avatar', 'plink', 'uri-id'];
$condition = ['guid' => $guid, 'visible' => true, 'deleted' => false, 'private' => [Item::PUBLIC, Item::UNLISTED]];
$item = Item::selectFirst($fields, $condition);

Expand Down Expand Up @@ -2465,7 +2463,7 @@ private static function receiveReshare(array $importer, $data, $xml, bool $fetch
$original_item["author-name"],
$original_item["author-link"],
$original_item["author-avatar"],
$original_item["plink"],
$original_item["plink"] ?? '',
$original_item["created"],
$original_item["guid"]
);
Expand Down

0 comments on commit 488b928

Please sign in to comment.