aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs/Lib/Activity.php
diff options
context:
space:
mode:
authorMario <mario@mariovavti.com>2022-10-20 13:16:03 +0000
committerMario <mario@mariovavti.com>2022-10-20 13:16:03 +0000
commitbf434818d7cfac6bf29482d4bb07fc567de2fc90 (patch)
treefc50a3cafce38134d758767caec1ffea8da8fdcf /Zotlabs/Lib/Activity.php
parent03aeb888322e792ccb17593761f1f93ad2906c7e (diff)
downloadvolse-hubzilla-bf434818d7cfac6bf29482d4bb07fc567de2fc90.tar.gz
volse-hubzilla-bf434818d7cfac6bf29482d4bb07fc567de2fc90.tar.bz2
volse-hubzilla-bf434818d7cfac6bf29482d4bb07fc567de2fc90.zip
fix php warnings
Diffstat (limited to 'Zotlabs/Lib/Activity.php')
-rw-r--r--Zotlabs/Lib/Activity.php8
1 files changed, 4 insertions, 4 deletions
diff --git a/Zotlabs/Lib/Activity.php b/Zotlabs/Lib/Activity.php
index d80394c7b..8380e2287 100644
--- a/Zotlabs/Lib/Activity.php
+++ b/Zotlabs/Lib/Activity.php
@@ -1600,9 +1600,9 @@ class Activity {
// we already store this in Activity::fetch()
// XConfig::Set($url, 'system', 'actor_record', $person_obj);
- $name = $person_obj['name'];
+ $name = $person_obj['name'] ?? '';
if (!$name) {
- $name = $person_obj['preferredUsername'];
+ $name = $person_obj['preferredUsername'] ?? '';
}
if (!$name) {
$name = t('Unknown');
@@ -1644,7 +1644,7 @@ class Activity {
$links = false;
$profile = false;
- if (is_array($person_obj['url'])) {
+ if (isset($person_obj['url']) && is_array($person_obj['url'])) {
if (!array_key_exists(0, $person_obj['url'])) {
$links = [$person_obj['url']];
}
@@ -1653,7 +1653,7 @@ class Activity {
}
}
- if ($links) {
+ if (is_array($links) && $links) {
foreach ($links as $link) {
if (is_array($link) && array_key_exists('mediaType', $link) && $link['mediaType'] === 'text/html') {
$profile = $link['href'];