Changed:
- $publicContact['about'] can be NULL, causing following error: -------------------------- Argument 1 passed to Friendica\Content\Text\BBCode::toPlaintext() must be of the type string, null given, called in /.../src/Object/Api/Twitter/User.php -------------------------- The "expensive" code there can be avoided being called by an empty string or NULL to increase performance.
This commit is contained in:
parent
e04ad87c15
commit
4bdce6948f
|
@ -119,7 +119,7 @@ class User extends BaseDataTransferObject
|
||||||
if (!$include_user_entities) {
|
if (!$include_user_entities) {
|
||||||
unset($this->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->profile_image_url_https = Contact::getAvatarUrlForUrl($publicContact['url'], $uid, Proxy::SIZE_MICRO);
|
||||||
$this->protected = false;
|
$this->protected = false;
|
||||||
$this->followers_count = $apcontact['followers_count'] ?? 0;
|
$this->followers_count = $apcontact['followers_count'] ?? 0;
|
||||||
|
|
Loading…
Reference in a new issue