From 937d6cb1efef3250f68f2b943e3964473495acae Mon Sep 17 00:00:00 2001 From: Mario Date: Thu, 22 Sep 2022 06:31:35 +0000 Subject: php8: fix warnings --- Zotlabs/Lib/Libzot.php | 4 ++-- Zotlabs/Lib/Webfinger.php | 4 ++-- Zotlabs/Module/Admin/Queue.php | 9 ++++----- Zotlabs/Web/WebServer.php | 2 +- view/css/conversation.css | 2 +- 5 files changed, 10 insertions(+), 11 deletions(-) diff --git a/Zotlabs/Lib/Libzot.php b/Zotlabs/Lib/Libzot.php index 2486f7d67..84fccd18f 100644 --- a/Zotlabs/Lib/Libzot.php +++ b/Zotlabs/Lib/Libzot.php @@ -2735,6 +2735,8 @@ class Libzot { $token = ((x($arr, 'token')) ? $arr['token'] : ''); $feed = ((x($arr, 'feed')) ? intval($arr['feed']) : 0); + $ztarget_hash = EMPTY_STR; + if ($ztarget) { $t = q("select * from hubloc where hubloc_id_url = '%s' and hubloc_network = 'zot6' limit 1", dbesc($ztarget) @@ -2742,7 +2744,6 @@ class Libzot { if ($t) { $ztarget_hash = $t[0]['hubloc_hash']; - } else { @@ -2750,7 +2751,6 @@ class Libzot { // permissions we would know about them and we only want to know who they are to // enumerate their specific permissions - $ztarget_hash = EMPTY_STR; } } diff --git a/Zotlabs/Lib/Webfinger.php b/Zotlabs/Lib/Webfinger.php index 611c36889..8484fb797 100644 --- a/Zotlabs/Lib/Webfinger.php +++ b/Zotlabs/Lib/Webfinger.php @@ -56,7 +56,7 @@ class Webfinger { if($m['scheme'] !== 'https') { return false; } - self::$server = $m['host'] . (($m['port']) ? ':' . $m['port'] : ''); + self::$server = $m['host'] . ((isset($m['port'])) ? ':' . $m['port'] : ''); } else { return false; @@ -86,7 +86,7 @@ class Webfinger { /** * @brief fetch a webfinger resource and return a zot6 discovery url if present * - */ + */ static function zot_url($resource) { diff --git a/Zotlabs/Module/Admin/Queue.php b/Zotlabs/Module/Admin/Queue.php index 8a843083b..8a20324d0 100644 --- a/Zotlabs/Module/Admin/Queue.php +++ b/Zotlabs/Module/Admin/Queue.php @@ -12,18 +12,18 @@ class Queue { $o = ''; - $expert = ((array_key_exists('expert',$_REQUEST)) ? intval($_REQUEST['expert']) : 0); + $expert = $_REQUEST['expert'] ?? false; - if($_REQUEST['drophub']) { + if(isset($_REQUEST['drophub'])) { hubloc_mark_as_down($_REQUEST['drophub']); LibQueue::remove_by_posturl($_REQUEST['drophub']); } - if($_REQUEST['emptyhub']) { + if(isset($_REQUEST['emptyhub'])) { LibQueue::remove_by_posturl($_REQUEST['emptyhub']); } - if($_REQUEST['deliverhub']) { + if(isset($_REQUEST['deliverhub'])) { $hubq = q("SELECT * FROM outq WHERE outq_posturl = '%s'", dbesc($_REQUEST['deliverhub']) @@ -39,7 +39,6 @@ class Queue { for($x = 0; $x < count($r); $x ++) { $r[$x]['eurl'] = urlencode($r[$x]['outq_posturl']); - $r[$x]['connected'] = datetime_convert('UTC',date_default_timezone_get(),$r[$x]['connected'],'Y-m-d'); } $o = replace_macros(get_markup_template('admin_queue.tpl'), array( diff --git a/Zotlabs/Web/WebServer.php b/Zotlabs/Web/WebServer.php index 70c6eb9b8..c1f43863a 100644 --- a/Zotlabs/Web/WebServer.php +++ b/Zotlabs/Web/WebServer.php @@ -58,7 +58,7 @@ class WebServer { if((x($_GET,'zid')) && (! \App::$install)) { \App::$query_string = strip_zids(\App::$query_string); if(! local_channel()) { - if ($_SESSION['my_address']!=$_GET['zid']) { + if (isset($_SESSION['my_address']) && $_SESSION['my_address'] != $_GET['zid']) { $_SESSION['my_address'] = $_GET['zid']; $_SESSION['authenticated'] = 0; } diff --git a/view/css/conversation.css b/view/css/conversation.css index 169808c57..97d7857cc 100644 --- a/view/css/conversation.css +++ b/view/css/conversation.css @@ -98,7 +98,7 @@ /* conv_item */ .wall-item-head-new { - border-top: 0.2rem solid #007bff; + border-top: 0.2rem solid var(--bs-blue); } .wall-item-info { -- cgit v1.2.3