Check if path contains key before replacing
This commit is contained in:
parent
3530d3dfe0
commit
03a2a00b30
|
@ -32,7 +32,9 @@ class Resolvers
|
|||
|
||||
$path = $route->getPath();
|
||||
foreach ($args as $key => $value) {
|
||||
$path = \str_replace(':' . $key, $value, $path);
|
||||
if (\str_contains($path, $key)) {
|
||||
$path = \str_replace(':' . $key, $value, $path);
|
||||
}
|
||||
}
|
||||
|
||||
$swoole->server['request_method'] = $route->getMethod();
|
||||
|
|
Loading…
Reference in a new issue