aboutsummaryrefslogtreecommitdiffstats
path: root/vendor/sabre/uri/lib/functions.php
diff options
context:
space:
mode:
authorMario Vavti <mario@mariovavti.com>2022-03-29 11:42:53 +0200
committerMario Vavti <mario@mariovavti.com>2022-03-29 11:42:53 +0200
commit0784cd593a39a4fc297e8a82f7e79bc8019a0868 (patch)
tree22182afb37cf460f8208fff9d276a0672add3185 /vendor/sabre/uri/lib/functions.php
parent0e2e9321025f87fe9587f3d183adaea6185e4e20 (diff)
parent9c5d2ee5630dd7033904039dcd1e92db8821b644 (diff)
downloadvolse-hubzilla-0784cd593a39a4fc297e8a82f7e79bc8019a0868.tar.gz
volse-hubzilla-0784cd593a39a4fc297e8a82f7e79bc8019a0868.tar.bz2
volse-hubzilla-0784cd593a39a4fc297e8a82f7e79bc8019a0868.zip
Merge branch '7.2RC'7.2
Diffstat (limited to 'vendor/sabre/uri/lib/functions.php')
-rw-r--r--vendor/sabre/uri/lib/functions.php6
1 files changed, 3 insertions, 3 deletions
diff --git a/vendor/sabre/uri/lib/functions.php b/vendor/sabre/uri/lib/functions.php
index 0d64cead0..18a324337 100644
--- a/vendor/sabre/uri/lib/functions.php
+++ b/vendor/sabre/uri/lib/functions.php
@@ -84,7 +84,7 @@ function resolve(string $basePath, string $newPath): string
$path = implode('/', $newPathParts);
// If the source url ended with a /, we want to preserve that.
- $newParts['path'] = $path;
+ $newParts['path'] = 0 === strpos($path, '/') ? $path : '/'.$path;
if ($delta['query']) {
$newParts['query'] = $delta['query'];
} elseif (!empty($base['query']) && empty($delta['host']) && empty($delta['path'])) {
@@ -214,7 +214,7 @@ function parse(string $uri): array
* This function takes the components returned from PHP's parse_url, and uses
* it to generate a new uri.
*
- * @param array<string, int|string> $parts
+ * @param array<string, int|string|null> $parts
*/
function build(array $parts): string
{
@@ -261,7 +261,7 @@ function build(array $parts): string
* is used) and we need a method that just operates on UTF-8 characters.
*
* In addition basename and dirname are platform aware, and will treat
- * backslash (\) as a directory separator on windows.
+ * backslash (\) as a directory separator on Windows.
*
* This method returns the 2 components as an array.
*