diff options
author | Mario <mario@mariovavti.com> | 2022-10-12 12:15:30 +0000 |
---|---|---|
committer | Mario <mario@mariovavti.com> | 2022-10-12 12:15:30 +0000 |
commit | a9a36894cb2637b546ed566ee06f20511cce031f (patch) | |
tree | d4db4326f9414e61771c5cfb3d23d1f47d1ec9a3 /Zotlabs/Lib/Libzot.php | |
parent | bc9778e02f6ba953c8437e8e9f4cc1f211a0232e (diff) | |
download | volse-hubzilla-a9a36894cb2637b546ed566ee06f20511cce031f.tar.gz volse-hubzilla-a9a36894cb2637b546ed566ee06f20511cce031f.tar.bz2 volse-hubzilla-a9a36894cb2637b546ed566ee06f20511cce031f.zip |
fix php warnings
Diffstat (limited to 'Zotlabs/Lib/Libzot.php')
-rw-r--r-- | Zotlabs/Lib/Libzot.php | 12 |
1 files changed, 6 insertions, 6 deletions
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']); |