Merge pull request #11696 from Quix0r/fixed-twitter-api-empty-about

Fixed "Argument 1 passed to Friendica\Content\Text\BBCode::toPlaintext() must be of the type string, null given"
This commit is contained in:
Hypolite Petovan 2022-06-26 18:46:15 -04:00 committed by GitHub
commit 43531d5aa0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -119,7 +119,7 @@ class User extends BaseDataTransferObject
if (!$include_user_entities) {
unset($this->entities);
}
$this->description = BBCode::toPlaintext($publicContact['about']);
$this->description = (!empty($publicContact['about']) ? BBCode::toPlaintext($publicContact['about']) : '');
$this->profile_image_url_https = Contact::getAvatarUrlForUrl($publicContact['url'], $uid, Proxy::SIZE_MICRO);
$this->protected = false;
$this->followers_count = $apcontact['followers_count'] ?? 0;