aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs/Lib
diff options
context:
space:
mode:
authorMario <mario@mariovavti.com>2022-10-12 19:36:24 +0000
committerMario <mario@mariovavti.com>2022-10-12 19:36:24 +0000
commit71efb0565803018cb1ba362706c763714c596cf7 (patch)
tree508827af55db42365892e6064f0e009e5068567e /Zotlabs/Lib
parenta9a36894cb2637b546ed566ee06f20511cce031f (diff)
downloadvolse-hubzilla-71efb0565803018cb1ba362706c763714c596cf7.tar.gz
volse-hubzilla-71efb0565803018cb1ba362706c763714c596cf7.tar.bz2
volse-hubzilla-71efb0565803018cb1ba362706c763714c596cf7.zip
fix php warnings
Diffstat (limited to 'Zotlabs/Lib')
-rw-r--r--Zotlabs/Lib/Activity.php8
-rw-r--r--Zotlabs/Lib/Libzot.php9
-rw-r--r--Zotlabs/Lib/Libzotdir.php4
3 files changed, 11 insertions, 10 deletions
diff --git a/Zotlabs/Lib/Activity.php b/Zotlabs/Lib/Activity.php
index 8afdb723a..26aef8104 100644
--- a/Zotlabs/Lib/Activity.php
+++ b/Zotlabs/Lib/Activity.php
@@ -415,7 +415,7 @@ class Activity {
$objtype = self::activity_obj_mapper($i['obj_type']);
}
- if ($i['obj']) {
+ if (isset($i['obj']) && $i['obj']) {
$ret = Activity::encode_object($i['obj']);
}
@@ -430,7 +430,7 @@ class Activity {
return $ret;
}
- if ($i['obj']) {
+ if (isset($i['obj']) && $i['obj']) {
if (is_array($i['obj'])) {
$ret = $i['obj'];
}
@@ -851,7 +851,7 @@ class Activity {
else
return [];
- if ($i['obj']) {
+ if (isset($i['obj']) && $i['obj']) {
if (!is_array($i['obj'])) {
$i['obj'] = json_decode($i['obj'], true);
}
@@ -879,7 +879,7 @@ class Activity {
$ret['type'] = 'Invite';
}
- if ($i['target']) {
+ if (isset($i['target']) && $i['target']) {
if (!is_array($i['target'])) {
$i['target'] = json_decode($i['target'], true);
}
diff --git a/Zotlabs/Lib/Libzot.php b/Zotlabs/Lib/Libzot.php
index 5c55b0ba9..7abbab00b 100644
--- a/Zotlabs/Lib/Libzot.php
+++ b/Zotlabs/Lib/Libzot.php
@@ -668,7 +668,7 @@ class Libzot {
$verified = false;
if (!self::verify($arr['id'], $arr['id_sig'], $arr['public_key'])) {
- logger('Unable to verify channel signature for ' . $arr['address']);
+ logger('Unable to verify channel signature for ' . $arr['primary_location']['address']);
return $ret;
}
else {
@@ -914,7 +914,7 @@ class Libzot {
// Which entries in the update table are we interested in updating?
- $address = (($ud_arr && $ud_arr['ud_addr']) ? $ud_arr['ud_addr'] : $arr['address']);
+ $address = (($ud_arr && $ud_arr['ud_addr']) ? $ud_arr['ud_addr'] : $arr['primary_location']['address']);
// Are we a directory server of some kind?
@@ -1298,7 +1298,7 @@ class Libzot {
}
}
- if ($AS->meta['hubloc']) {
+ if (isset($AS->meta['hubloc']) && $AS->meta['hubloc']) {
$arr['item_verified'] = true;
}
@@ -1306,7 +1306,7 @@ class Libzot {
$arr['comment_policy'] = 'authenticated';
}
- if ($AS->meta['signed_data']) {
+ if (isset($AS->meta['signed_data']) && $AS->meta['signed_data']) {
IConfig::Set($arr, 'activitypub', 'signed_data', $AS->meta['signed_data'], false);
}
@@ -1516,6 +1516,7 @@ class Libzot {
foreach ($deliveries as $d) {
$local_public = $public;
+ $item_result = null;
$DR = new DReport(z_root(), $sender, $d, $arr['mid']);
diff --git a/Zotlabs/Lib/Libzotdir.php b/Zotlabs/Lib/Libzotdir.php
index 4f35a1b80..db8992fc4 100644
--- a/Zotlabs/Lib/Libzotdir.php
+++ b/Zotlabs/Lib/Libzotdir.php
@@ -145,8 +145,8 @@ class Libzotdir {
if(! $directory_sort_order)
$directory_sort_order = 'date';
- $current_order = (($_REQUEST['order']) ? $_REQUEST['order'] : $directory_sort_order);
- $suggest = (($_REQUEST['suggest']) ? '&suggest=' . $_REQUEST['suggest'] : '');
+ $current_order = $_REQUEST['order'] ?? $directory_sort_order;
+ $suggest = ((isset($_REQUEST['suggest'])) ? '&suggest=' . $_REQUEST['suggest'] : '');
$url = 'directory?f=';