fix more php warnings

This commit is contained in:
Mario Vavti
2022-11-02 16:52:42 +01:00
parent 1cf659033b
commit f4d39bd3c8
3 changed files with 7 additions and 3 deletions

View File

@@ -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;
}

View File

@@ -71,9 +71,12 @@ class Zot6Handler implements IHandler {
where xchan_hash ='%s' limit 1",
dbesc($recip)
);
if ($r) {
$x = Libzot::refresh([ 'hubloc_id_url' => $hub['hubloc_id_url']], $r[0], $force);
}
}
}
else {
// system wide refresh
$x = Libzot::refresh(['hubloc_id_url' => $hub['hubloc_id_url']], null, $force);

View File

@@ -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);