aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMario Vavti <mario@mariovavti.com>2022-11-02 16:52:42 +0100
committerMario Vavti <mario@mariovavti.com>2022-11-02 16:52:42 +0100
commitf4d39bd3c86feebd21cfbfe61b7da5d32421113d (patch)
treeaa73e73b3c4094a33fc93856e32eb1a489215281
parent1cf659033b376026aecaec7951c743f78c2b0511 (diff)
downloadvolse-hubzilla-f4d39bd3c86feebd21cfbfe61b7da5d32421113d.tar.gz
volse-hubzilla-f4d39bd3c86feebd21cfbfe61b7da5d32421113d.tar.bz2
volse-hubzilla-f4d39bd3c86feebd21cfbfe61b7da5d32421113d.zip
fix more php warnings
-rw-r--r--Zotlabs/Daemon/Notifier.php3
-rw-r--r--Zotlabs/Zot6/Zot6Handler.php5
-rw-r--r--include/connections.php2
3 files changed, 7 insertions, 3 deletions
diff --git a/Zotlabs/Daemon/Notifier.php b/Zotlabs/Daemon/Notifier.php
index f9e1d13d5..bfccb4099 100644
--- a/Zotlabs/Daemon/Notifier.php
+++ b/Zotlabs/Daemon/Notifier.php
@@ -657,7 +657,8 @@ class Notifier {
$hash = new_uuid();
- $env = (($hub_env && $hub_env[$hub['hubloc_site_id']]) ? $hub_env[$hub['hubloc_site_id']] : '');
+ $env = $hub_env[$hub['hubloc_site_id']] ?? '';
+
if ((self::$private) && (!$env)) {
continue;
}
diff --git a/Zotlabs/Zot6/Zot6Handler.php b/Zotlabs/Zot6/Zot6Handler.php
index 4dc410f52..053901205 100644
--- a/Zotlabs/Zot6/Zot6Handler.php
+++ b/Zotlabs/Zot6/Zot6Handler.php
@@ -71,7 +71,10 @@ class Zot6Handler implements IHandler {
where xchan_hash ='%s' limit 1",
dbesc($recip)
);
- $x = Libzot::refresh([ 'hubloc_id_url' => $hub['hubloc_id_url']], $r[0], $force);
+
+ if ($r) {
+ $x = Libzot::refresh([ 'hubloc_id_url' => $hub['hubloc_id_url']], $r[0], $force);
+ }
}
}
else {
diff --git a/include/connections.php b/include/connections.php
index 936fc1edd..2a186192d 100644
--- a/include/connections.php
+++ b/include/connections.php
@@ -384,7 +384,7 @@ function contact_remove($channel_id, $abook_id) {
dbesc($abook['abook_xchan'])
);
- if ($xchan && strpos($xchan['xchan_addr'],'guest:') === 0 && strpos($abook['abook_xchan'],'.')){
+ if ($xchan && strpos($xchan[0]['xchan_addr'],'guest:') === 0 && strpos($abook['abook_xchan'],'.')){
$atoken_guid = substr($abook['abook_xchan'],strrpos($abook['abook_xchan'],'.') + 1);
if ($atoken_guid) {
atoken_delete_and_sync($channel_id,$atoken_guid);