Skip to content

Commit

Permalink
[K6.1] stripBBCode(): Argument #1 ($txt) must be of type string, null
Browse files Browse the repository at this point in the history
  • Loading branch information
xillibit committed Jul 4, 2023
1 parent 47a26df commit 25ac651
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/site/src/Controller/Topic/Item/TopicItemDisplay.php
Expand Up @@ -582,13 +582,13 @@ protected function prepareDocument()
}
}

$multispaces_replaced = '';
if (!empty($this->topic->first_post_message)) {
$first = KunenaParser::stripBBCode($this->topic->first_post_message, 160);
$first = $this->topic->subject;
$firstPostMessage = KunenaParser::stripBBCode($this->topic->first_post_message, 160);
$firstPostMessage = $this->topic->subject;
$multispaces_replaced = preg_replace('/\s+/', ' ', $firstPostMessage);
}

$multispaces_replaced = preg_replace('/\s+/', ' ', $first);

$this->setMetaData('og:description', $multispaces_replaced, 'property');
$this->setMetaData('og:image', $image, 'property');
$this->setMetaData('article:published_time', $this->topic->getFirstPostTime()->toISO8601(), 'property');
Expand Down

0 comments on commit 25ac651

Please sign in to comment.