Merge pull request #11705 from Quix0r/fixes/null-value-invocation

Fix for "Argument 1 passed to Friendica\Content\Text\BBCode::toPlaintext() must be of the type string, null given"
pull/11709/head
Hypolite Petovan 2022-07-03 08:57:23 -04:00 zatwierdzone przez GitHub
commit c88898df9c
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 4AEE18F83AFDEB23
2 zmienionych plików z 1 dodań i 3 usunięć

Wyświetl plik

@ -302,7 +302,7 @@ function display_content(App $a, $update = false, $update_uid = 0)
// 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']);

Wyświetl plik

@ -424,7 +424,6 @@ class BBCode
*
* @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
@ -449,7 +448,6 @@ class BBCode
*
* @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