1
0
Fork 0
mirror of synced 2024-07-02 21:20:58 +12:00

Check if path contains key before replacing

This commit is contained in:
Jake Barnby 2022-07-18 19:29:51 +12:00
parent 3530d3dfe0
commit 03a2a00b30

View file

@ -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();