This will 2 things:

1) The first change prevents "expensive" code in HTML::toBBcode() to be executed
   just for an empty string which makes no sense.
2) The above change was maybe flawed as $apcontact['about'] would have never
   been created, not even empty which could have side effects

Thanks to @annando to make me rethink this part of code.
This commit is contained in:
Roland Häder 2022-06-16 15:08:04 +02:00
parent 7814ba4fc4
commit f2b7326650
No known key found for this signature in database
GPG Key ID: C82EDE5DDFA0BA77

View File

@ -242,9 +242,7 @@ class APContact
}
$aboutHtml = JsonLD::fetchElement($compacted, 'as:summary', '@value');
if ($aboutHtml != "") {
$apcontact['about'] = HTML::toBBCode($aboutHtml);
}
$apcontact['about'] = (!empty($aboutHtml) ? HTML::toBBCode($aboutHtml) : '');
$ims = JsonLD::fetchElementArray($compacted, 'vcard:hasInstantMessage');