mirror of
https://github.com/friendica/friendica
synced 2025-04-22 07:50:11 +00:00
Fixes and type-hints:
- added more checked type-hints as they prevent bad method invocations - fixed TypeError for HTML::toBBCode() invocations with NULL as first (wrong) argument, thanks to @tobias@social.diekershoff.de pointing this out.
This commit is contained in:
parent
bb57d45237
commit
b1e4c0931a
2 changed files with 19 additions and 14 deletions
|
@ -241,9 +241,13 @@ class APContact
|
|||
$apcontact['name'] = $apcontact['nick'];
|
||||
}
|
||||
|
||||
$apcontact['about'] = HTML::toBBCode(JsonLD::fetchElement($compacted, 'as:summary', '@value'));
|
||||
$aboutHtml = JsonLD::fetchElement($compacted, 'as:summary', '@value');
|
||||
if ($aboutHtml != "") {
|
||||
$apcontact['about'] = HTML::toBBCode($aboutHtml);
|
||||
}
|
||||
|
||||
$ims = JsonLD::fetchElementArray($compacted, 'vcard:hasInstantMessage');
|
||||
|
||||
if (!empty($ims)) {
|
||||
foreach ($ims as $link) {
|
||||
if (substr($link, 0, 5) == 'xmpp:') {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue