bug fixes from the day before

This commit is contained in:
Dennis Eichhorn 2022-03-19 00:02:44 +01:00
parent e25b309171
commit a2f067920c

View File

@ -288,7 +288,13 @@ final class UriFactory
$parsed = \preg_replace_callback('(\{[\/#\?%@\.\$][a-zA-Z0-9\-]*\})', function ($match) use ($toMatch) {
$match = \substr($match[0], 1, \strlen($match[0]) - 2);
return $toMatch[$match] ?? self::$uri[$match] ?? '---';
return $toMatch[$match]
?? (self::$uri[$match] ?? (
($match[0] ?? '') === '?'
? '---' // only do this for query parameters
: ''
)
);
}, $uri);
return self::unique($parsed ?? '');