"Argument 1 passed to Friendica\Content\Text\BBCode::toPlaintext() must be of the type string, null given, called in /var/www/.../htdocs/mod/display.php on line 305"
// Preparing the meta header
$description = trim(BBCode::toPlaintext($item['body']));
- $title = trim(BBCode::toPlaintext($item['title']));
+ $title = trim(BBCode::toPlaintext($item['title'] ?? ''));
$author_name = $item['author-name'];
$image = DI::baseUrl()->remove($item['author-avatar']);
*
* @param string $body
* @param boolean $no_link_desc No link description
- *
* @return string with replaced body
*/
public static function removeAttachment(string $body, bool $no_link_desc = false): string
*
* @param string $text
* @param bool $keep_urls Whether to keep URLs in the resulting plaintext
- *
* @return string
*/
public static function toPlaintext(string $text, bool $keep_urls = true): string