mirror of
https://github.com/Karaka-Management/phpOMS.git
synced 2026-02-08 21:28:40 +00:00
don't parse uris without {} elements
This commit is contained in:
parent
568f3fab4b
commit
479c9fff69
|
|
@ -248,6 +248,10 @@ final class UriFactory
|
||||||
*/
|
*/
|
||||||
public static function build(string $uri, array $toMatch = []) : string
|
public static function build(string $uri, array $toMatch = []) : string
|
||||||
{
|
{
|
||||||
|
if (\stripos($uri, '{') === false) {
|
||||||
|
return $uri;
|
||||||
|
}
|
||||||
|
|
||||||
$parsed = \preg_replace_callback('(\{[\/#\?%@\.\$][a-zA-Z0-9\-]*\})', function ($match) use ($toMatch) {
|
$parsed = \preg_replace_callback('(\{[\/#\?%@\.\$][a-zA-Z0-9\-]*\})', function ($match) use ($toMatch) {
|
||||||
$match = \substr($match[0], 1, \strlen($match[0]) - 2);
|
$match = \substr($match[0], 1, \strlen($match[0]) - 2);
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user