aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs/Lib/Activity.php
diff options
context:
space:
mode:
authorMario <mario@mariovavti.com>2022-10-26 21:40:27 +0000
committerMario <mario@mariovavti.com>2022-10-26 21:40:27 +0000
commit5d7081a22446aa8f67e38a115cb89e8ea60c3f9e (patch)
tree216c606a432082d95c2d9a97fde1ee20298f8a53 /Zotlabs/Lib/Activity.php
parent9cbdf3f31f6493c61705351fb55827928d0b7387 (diff)
downloadvolse-hubzilla-5d7081a22446aa8f67e38a115cb89e8ea60c3f9e.tar.gz
volse-hubzilla-5d7081a22446aa8f67e38a115cb89e8ea60c3f9e.tar.bz2
volse-hubzilla-5d7081a22446aa8f67e38a115cb89e8ea60c3f9e.zip
fix php warnings
Diffstat (limited to 'Zotlabs/Lib/Activity.php')
-rw-r--r--Zotlabs/Lib/Activity.php15
1 files changed, 8 insertions, 7 deletions
diff --git a/Zotlabs/Lib/Activity.php b/Zotlabs/Lib/Activity.php
index e3306ca3e..1a34fdae6 100644
--- a/Zotlabs/Lib/Activity.php
+++ b/Zotlabs/Lib/Activity.php
@@ -721,7 +721,7 @@ class Activity {
$ret['type'] = self::activity_mapper($i['verb']);
- if (intval($i['item_deleted']) && !$recurse) {
+ if ((isset($i['item_deleted']) && intval($i['item_deleted'])) && !$recurse) {
$is_response = false;
if (ActivityStreams::is_response_activity($ret['type'])) {
@@ -805,10 +805,10 @@ class Activity {
$ret['diaspora:guid'] = $i['uuid'];
- if ($i['title'])
+ if (isset($i['title']) && $i['title'])
$ret['name'] = html2plain(bbcode($i['title'], ['cache' => true]));
- if ($i['summary'])
+ if (isset($i['summary']) && $i['summary'])
$ret['summary'] = bbcode($i['summary'], ['cache' => true]);
if ($ret['type'] === 'Announce') {
@@ -820,13 +820,14 @@ class Activity {
];
}
- $ret['published'] = datetime_convert('UTC', 'UTC', $i['created'], ATOM_TIME);
- if ($i['created'] !== $i['edited'])
+ $ret['published'] = ((isset($i['created'])) ? datetime_convert('UTC', 'UTC', $i['created'], ATOM_TIME) : datetime_convert());
+ if (isset($i['created'], $i['edited']) && $i['created'] !== $i['edited'])
$ret['updated'] = datetime_convert('UTC', 'UTC', $i['edited'], ATOM_TIME);
- if ($i['app']) {
+
+ if (isset($i['app']) && $i['app']) {
$ret['generator'] = ['type' => 'Application', 'name' => $i['app']];
}
- if ($i['location'] || $i['coord']) {
+ if (isset($i['location']) || isset($i['coord'])) {
$ret['location'] = ['type' => 'Place'];
if ($i['location']) {
$ret['location']['name'] = $i['location'];