From f3f49cf80f2441d576d825f116afdb5a66bb7c54 Mon Sep 17 00:00:00 2001 From: Mario Vavti Date: Tue, 2 Feb 2021 10:58:10 +0100 Subject: fix php8 issues --- Zotlabs/Lib/Apps.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Zotlabs/Lib') diff --git a/Zotlabs/Lib/Apps.php b/Zotlabs/Lib/Apps.php index 05b2ba177..d77a3fda2 100644 --- a/Zotlabs/Lib/Apps.php +++ b/Zotlabs/Lib/Apps.php @@ -307,7 +307,7 @@ class Apps { } } } - if($ret) { + if(isset($ret)) { if($translate) self::translate_system_apps($ret); -- cgit v1.2.3 From e312c381d897866b15179fd301d9979b46f2f678 Mon Sep 17 00:00:00 2001 From: Mario Vavti Date: Tue, 2 Feb 2021 11:47:38 +0100 Subject: import_xchan() $arr photo structure has changed --- Zotlabs/Lib/Libzot.php | 6 +++--- Zotlabs/Lib/Libzotdir.php | 3 ++- 2 files changed, 5 insertions(+), 4 deletions(-) (limited to 'Zotlabs/Lib') diff --git a/Zotlabs/Lib/Libzot.php b/Zotlabs/Lib/Libzot.php index fd30f05f5..0ead8402e 100644 --- a/Zotlabs/Lib/Libzot.php +++ b/Zotlabs/Lib/Libzot.php @@ -763,8 +763,8 @@ class Libzot { 'xchan_guid' => $arr['id'], 'xchan_guid_sig' => $arr['id_sig'], 'xchan_pubkey' => $arr['public_key'], - 'xchan_photo_mimetype' => $arr['photo_mimetype'], - 'xchan_photo_l' => $arr['photo'], + 'xchan_photo_mimetype' => $arr['photo']['type'], + 'xchan_photo_l' => $arr['photo']['url'], 'xchan_addr' => escape_tags($arr['primary_location']['address']), 'xchan_url' => escape_tags($arr['primary_location']['url']), 'xchan_connurl' => $arr['primary_location']['connections_url'], @@ -772,7 +772,7 @@ class Libzot { 'xchan_connpage' => $arr['connect_url'], 'xchan_name' => (($arr['name']) ? escape_tags($arr['name']) : '-'), 'xchan_network' => 'zot6', - 'xchan_photo_date' => $arr['photo_updated'], + 'xchan_photo_date' => $arr['photo']['updated'], 'xchan_name_date' => $arr['name_updated'], 'xchan_hidden' => intval(1 - intval($arr['searchable'])), 'xchan_selfcensored' => $arr['adult_content'], diff --git a/Zotlabs/Lib/Libzotdir.php b/Zotlabs/Lib/Libzotdir.php index d4c5398ee..41c0a54e9 100644 --- a/Zotlabs/Lib/Libzotdir.php +++ b/Zotlabs/Lib/Libzotdir.php @@ -311,12 +311,13 @@ class Libzotdir { if ($ud['ud_addr'] && (! ($ud['ud_flags'] & UPDATE_FLAGS_DELETED))) { $success = false; + $zf = []; $href = Webfinger::zot_url(punify($ud['ud_addr'])); if($href) { $zf = Zotfinger::exec($href); } - if(is_array($zf) && array_path_exists('signature/signer',$zf) && $zf['signature']['signer'] === $href && intval($zf['signature']['header_valid'])) { + if(array_path_exists('signature/signer',$zf) && $zf['signature']['signer'] === $href && intval($zf['signature']['header_valid'])) { $xc = Libzot::import_xchan($zf['data'], 0, $ud); } else { -- cgit v1.2.3 From 34b28cd8d36c7805e65c442ff1588ccf5165387a Mon Sep 17 00:00:00 2001 From: Mario Vavti Date: Wed, 3 Feb 2021 10:22:34 +0100 Subject: fix wrong operand --- Zotlabs/Lib/Enotify.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Zotlabs/Lib') diff --git a/Zotlabs/Lib/Enotify.php b/Zotlabs/Lib/Enotify.php index 3a24cd349..d2a0f0abc 100644 --- a/Zotlabs/Lib/Enotify.php +++ b/Zotlabs/Lib/Enotify.php @@ -43,7 +43,7 @@ class Enotify { dbesc($params['to_xchan']) ); } - if ($x & $y) { + if ($x && $y) { $sender = $x[0]; $recip = $y[0]; } else { -- cgit v1.2.3