aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs/Lib
diff options
context:
space:
mode:
Diffstat (limited to 'Zotlabs/Lib')
-rw-r--r--Zotlabs/Lib/Libsync.php2
-rw-r--r--Zotlabs/Lib/Libzot.php12
-rw-r--r--Zotlabs/Lib/ThreadItem.php2
3 files changed, 9 insertions, 7 deletions
diff --git a/Zotlabs/Lib/Libsync.php b/Zotlabs/Lib/Libsync.php
index 36a0a044c..4e090b937 100644
--- a/Zotlabs/Lib/Libsync.php
+++ b/Zotlabs/Lib/Libsync.php
@@ -762,6 +762,8 @@ class Libsync {
static function sync_locations($sender, $arr, $absolute = false) {
$ret = [];
+ $what = '';
+ $changed = false;
// If a sender reports that the channel has been deleted, delete its hubloc
if (isset($arr['deleted_locally']) && intval($arr['deleted_locally'])) {
diff --git a/Zotlabs/Lib/Libzot.php b/Zotlabs/Lib/Libzot.php
index 6f7d74606..5c55b0ba9 100644
--- a/Zotlabs/Lib/Libzot.php
+++ b/Zotlabs/Lib/Libzot.php
@@ -710,11 +710,11 @@ class Libzot {
$hidden_changed = $adult_changed = $deleted_changed = $pubforum_changed = 0;
- if (intval($r[0]['xchan_hidden']) != (1 - intval($arr['searchable'])))
+ if (isset($arr['searchable']) && intval($r[0]['xchan_hidden']) != (1 - intval($arr['searchable'])))
$hidden_changed = 1;
- if (intval($r[0]['xchan_selfcensored']) != intval($arr['adult_content']))
+ if (isset($arr['adult_content']) && intval($r[0]['xchan_selfcensored']) != intval($arr['adult_content']))
$adult_changed = 1;
- if (intval($r[0]['xchan_deleted']) != intval($arr['deleted']))
+ if (isset($arr['xchan_deleted']) && intval($r[0]['xchan_deleted']) != intval($arr['deleted']))
$deleted_changed = 1;
// new style 6-MAR-2019
@@ -733,7 +733,7 @@ class Libzot {
// old style
- if (intval($r[0]['xchan_pubforum']) != intval($arr['public_forum']))
+ if (isset($arr['public_forum']) && intval($r[0]['xchan_pubforum']) != intval($arr['public_forum']))
$pubforum_changed = 1;
@@ -1027,7 +1027,7 @@ class Libzot {
// handle remote validation issues
$b = q("update dreport set dreport_result = '%s', dreport_time = '%s' where dreport_queue = '%s'",
- dbesc(($x['message']) ? $x['message'] : 'unknown delivery error'),
+ dbesc($x['message'] ?? 'unknown delivery error'),
dbesc(datetime_convert()),
dbesc($outq['outq_hash'])
);
@@ -1437,7 +1437,7 @@ class Libzot {
if ($check_mentions) {
// It's a top level post. Look at the tags. See if any of them are mentions and are on this hub.
if ($act && $act->obj) {
- if (is_array($act->obj['tag']) && $act->obj['tag']) {
+ if (isset($act->obj['tag']) && is_array($act->obj['tag']) && $act->obj['tag']) {
foreach ($act->obj['tag'] as $tag) {
if ($tag['type'] === 'Mention' && (strpos($tag['href'], z_root()) !== false)) {
$address = basename($tag['href']);
diff --git a/Zotlabs/Lib/ThreadItem.php b/Zotlabs/Lib/ThreadItem.php
index 8cc0f6aa5..0343dc1e5 100644
--- a/Zotlabs/Lib/ThreadItem.php
+++ b/Zotlabs/Lib/ThreadItem.php
@@ -298,7 +298,7 @@ class ThreadItem {
}
$has_bookmarks = false;
- if(Apps::system_app_installed(local_channel(), 'Bookmarks') && is_array($item['term'])) {
+ if(Apps::system_app_installed(local_channel(), 'Bookmarks') && isset($item['term']) && is_array($item['term'])) {
foreach($item['term'] as $t) {
if(($t['ttype'] == TERM_BOOKMARK))
$has_bookmarks = true;