Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 2feff9e

Browse files
committed
FIX UriHelper::buildStringFromParts misses slash when scheme or authority is defined
1 parent 6c6f1fa commit 2feff9e

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

‎src/utils/UriHelper.php‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -236,7 +236,10 @@ public static function buildStringFromParts(array $uriParts): string
236236
}
237237
}
238238
if (!empty($uriParts['path'])) {
239-
$join[] = preg_replace('/^\/+/', '/', $uriParts['path']);
239+
if (count($join)) {
240+
$join[] = '/';
241+
}
242+
$join[] = ltrim($uriParts['path'], '/');
240243
}
241244
if (!empty($uriParts['query'])) {
242245
$join[] = "?{$uriParts['query']}";

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /