aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMario <mario@mariovavti.com>2024-06-10 08:22:43 +0000
committerMario <mario@mariovavti.com>2024-06-10 08:22:43 +0000
commit388e7c88dff956dca9e3498076e9f3cf49a153c8 (patch)
tree3bf21521a3b7e49299faa57605c9ec683726493f
parent9348bd6ea5bc8573201ed773c1de26949dd1b510 (diff)
downloadvolse-hubzilla-388e7c88dff956dca9e3498076e9f3cf49a153c8.tar.gz
volse-hubzilla-388e7c88dff956dca9e3498076e9f3cf49a153c8.tar.bz2
volse-hubzilla-388e7c88dff956dca9e3498076e9f3cf49a153c8.zip
remove superfluous param, fix wrong var and declare types for unparse_url()
-rw-r--r--Zotlabs/Lib/Activity.php4
-rw-r--r--include/network.php6
2 files changed, 5 insertions, 5 deletions
diff --git a/Zotlabs/Lib/Activity.php b/Zotlabs/Lib/Activity.php
index b628221fb..5613e6bda 100644
--- a/Zotlabs/Lib/Activity.php
+++ b/Zotlabs/Lib/Activity.php
@@ -70,7 +70,7 @@ class Activity {
}
if ($items) {
- return self::encode_item(array_shift($items), true);
+ return self::encode_item(array_shift($items));
}
return null;
@@ -2902,7 +2902,7 @@ class Activity {
if (intval($parent[0]['item_private'])) {
if (!intval($item['item_private'])) {
- $item['item_private'] = intval($parent_item['item_private']);
+ $item['item_private'] = intval($parent[0]['item_private']);
$item['allow_cid'] = '<' . $channel['channel_hash'] . '>';
$item['allow_gid'] = $item['deny_cid'] = $item['deny_gid'] = '';
}
diff --git a/include/network.php b/include/network.php
index 1978eb868..bb5bc1ce7 100644
--- a/include/network.php
+++ b/include/network.php
@@ -2146,9 +2146,9 @@ function get_request_string($url) {
*
* @param array $parsed_url An associative array as produced by `parse_url`.
*
- * @return The reassembled URL as a string.
+ * @return string The reassembled URL as a string.
*/
-function unparse_url($parsed_url) {
+function unparse_url(array $parsed_url): string {
$scheme = isset($parsed_url['scheme']) ? $parsed_url['scheme'] . '://' : '';
$host = isset($parsed_url['host']) ? $parsed_url['host'] : '';
$port = isset($parsed_url['port']) ? ':' . $parsed_url['port'] : '';
@@ -2158,5 +2158,5 @@ function unparse_url($parsed_url) {
$path = isset($parsed_url['path']) ? $parsed_url['path'] : '';
$query = isset($parsed_url['query']) ? '?' . $parsed_url['query'] : '';
$fragment = isset($parsed_url['fragment']) ? '#' . $parsed_url['fragment'] : '';
- return "$scheme$user$pass$host$port$path$query$fragment";
+ return $scheme . $user . $pass . $host . $port . $path . $query . $fragment;
}