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:
@@ -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:') {
|
||||
|
||||
Reference in New Issue
Block a user