From fadb0a5bf24199475f01f893c8892f5bba495bab Mon Sep 17 00:00:00 2001 From: Mario Date: Sat, 13 Jan 2024 20:45:32 +0000 Subject: check for assertionMethod --- Zotlabs/Lib/Activity.php | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to 'Zotlabs') diff --git a/Zotlabs/Lib/Activity.php b/Zotlabs/Lib/Activity.php index 6c680c56e..3da6e6e92 100644 --- a/Zotlabs/Lib/Activity.php +++ b/Zotlabs/Lib/Activity.php @@ -1757,12 +1757,14 @@ class Activity { } $epubkey = ''; - foreach($person_obj['assertionMethod'] as $am) { - if ($person_obj['id'] === $am['controller'] && - $am['type'] === 'Multikey' && - str_starts_with($am['publicKeyMultibase'], 'z6Mk') - ) { - $epubkey = $person_obj['assertionMethod']['publicKeyMultibase']; + if (isset($person_obj['assertionMethod'])) { + foreach($person_obj['assertionMethod'] as $am) { + if ($person_obj['id'] === $am['controller'] && + $am['type'] === 'Multikey' && + str_starts_with($am['publicKeyMultibase'], 'z6Mk') + ) { + $epubkey = $person_obj['assertionMethod']['publicKeyMultibase']; + } } } -- cgit v1.2.3