aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMax Kostikov <max@kostikov.co>2021-03-10 19:52:05 +0000
committerMax Kostikov <max@kostikov.co>2021-03-10 19:52:05 +0000
commit0a86efc6317d64173ec9785c6edeeedaffbae04e (patch)
treec9e8ed6ca254ae5e0db325e62b6ffee4e1e54442
parent15bc5c64f3f4c3226e6329f8b8aa73df4aeb5e0b (diff)
parentf8467845d208c0efde81d00d51cd0eb10637f6d5 (diff)
downloadvolse-hubzilla-0a86efc6317d64173ec9785c6edeeedaffbae04e.tar.gz
volse-hubzilla-0a86efc6317d64173ec9785c6edeeedaffbae04e.tar.bz2
volse-hubzilla-0a86efc6317d64173ec9785c6edeeedaffbae04e.zip
Merge branch 'php8fixes' into 'dev'
Check for HTTP port use on URL build See merge request hubzilla/core!1924
-rw-r--r--Zotlabs/Daemon/Queue.php2
-rw-r--r--Zotlabs/Lib/Queue.php2
-rw-r--r--include/bookmarks.php2
-rw-r--r--include/queue_fn.php2
4 files changed, 4 insertions, 4 deletions
diff --git a/Zotlabs/Daemon/Queue.php b/Zotlabs/Daemon/Queue.php
index 36bdcfe81..e1f4b73de 100644
--- a/Zotlabs/Daemon/Queue.php
+++ b/Zotlabs/Daemon/Queue.php
@@ -28,7 +28,7 @@ class Queue {
if ($r) {
foreach ($r as $rr) {
$h = parse_url($rr['outq_posturl']);
- $desturl = $h['scheme'] . '://' . $h['host'] . (($h['port']) ? ':' . $h['port'] : '');
+ $desturl = $h['scheme'] . '://' . $h['host'] . (isset($h['port']) ? ':' . $h['port'] : '');
q("update site set site_dead = 1 where site_dead = 0 and site_url = '%s' and site_update < %s - INTERVAL %s",
dbesc($desturl),
db_utcnow(), db_quoteinterval('1 MONTH')
diff --git a/Zotlabs/Lib/Queue.php b/Zotlabs/Lib/Queue.php
index ba314ded3..373a7d304 100644
--- a/Zotlabs/Lib/Queue.php
+++ b/Zotlabs/Lib/Queue.php
@@ -134,7 +134,7 @@ class Queue {
$base = null;
$h = parse_url($outq['outq_posturl']);
if($h !== false)
- $base = $h['scheme'] . '://' . $h['host'] . (($h['port']) ? ':' . $h['port'] : '');
+ $base = $h['scheme'] . '://' . $h['host'] . (isset($h['port']) ? ':' . $h['port'] : '');
if(($base) && ($base !== z_root()) && ($immediate)) {
$y = q("select site_update, site_dead from site where site_url = '%s' ",
diff --git a/include/bookmarks.php b/include/bookmarks.php
index 145119347..207cf5a33 100644
--- a/include/bookmarks.php
+++ b/include/bookmarks.php
@@ -73,6 +73,6 @@ function get_bookmark_link($observer) {
$h = @parse_url($observer['xchan_url']);
if($h)
- return $h['scheme'] . '://' . $h['host'] . (($h['port']) ? ':' . $h['port'] : '') . '/rbmark?f=';
+ return $h['scheme'] . '://' . $h['host'] . (isset($h['port']) ? ':' . $h['port'] : '') . '/rbmark?f=';
return '';
}
diff --git a/include/queue_fn.php b/include/queue_fn.php
index b505a5b22..1e8171b1d 100644
--- a/include/queue_fn.php
+++ b/include/queue_fn.php
@@ -132,7 +132,7 @@ function queue_deliver($outq, $immediate = false) {
$base = null;
$h = parse_url($outq['outq_posturl']);
if($h !== false)
- $base = $h['scheme'] . '://' . $h['host'] . (array_key_exists('port', $h) ? ':' . $h['port'] : '');
+ $base = $h['scheme'] . '://' . $h['host'] . (isset($h['port']) ? ':' . $h['port'] : '');
if(($base) && ($base !== z_root()) && ($immediate)) {
$y = q("select site_update, site_dead from site where site_url = '%s' ",