aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs
diff options
context:
space:
mode:
Diffstat (limited to 'Zotlabs')
-rw-r--r--Zotlabs/Lib/Libzot.php4
-rw-r--r--Zotlabs/Lib/Webfinger.php4
-rw-r--r--Zotlabs/Module/Admin/Queue.php9
-rw-r--r--Zotlabs/Web/WebServer.php2
4 files changed, 9 insertions, 10 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;
}