mirror of
https://github.com/appwrite/appwrite.git
synced 2026-11-18 20:36:03 +00:00
Tighten param reconstruction
Use Request::getParam() for the query/body+default fallback instead of a cached getParams() copy, dropping the temporary and shortening the diff. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
1 parent
ad7a76abbb
commit
0bf406e597
1 file changed
+3
-6
@@ -863,14 +863,11 @@ Http::shutdown()
|
||||
}
|
||||
}
|
||||
|
||||
// $params holds the URL path values (injected from the route match);
|
||||
// merge in query/body params and declared defaults to reproduce the
|
||||
// full resolved param set, with path values taking precedence.
|
||||
$reqParams = $request->getParams();
|
||||
|
||||
// Reproduce the resolved param set: injected path values take precedence
|
||||
// over query/body params, falling back to each param's declared default.
|
||||
$requestParams = [];
|
||||
foreach ($route->getParams() as $key => $param) {
|
||||
$requestParams[$key] = $params[$key] ?? $reqParams[$key] ?? $param['default'];
|
||||
$requestParams[$key] = $params[$key] ?? $request->getParam($key, $param['default']);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in new issue
Block a user