From 03a2a00b30151658bd6d3eaae787de14327a78c2 Mon Sep 17 00:00:00 2001 From: Jake Barnby Date: Mon, 18 Jul 2022 19:29:51 +1200 Subject: [PATCH] Check if path contains key before replacing --- src/Appwrite/GraphQL/Resolvers.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/Appwrite/GraphQL/Resolvers.php b/src/Appwrite/GraphQL/Resolvers.php index e909e939f0..04f903290b 100644 --- a/src/Appwrite/GraphQL/Resolvers.php +++ b/src/Appwrite/GraphQL/Resolvers.php @@ -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();