Skip to content

Commit

Permalink
改进路由参数绑定
Browse files Browse the repository at this point in the history
  • Loading branch information
liu21st authored and VinchanGit committed Aug 30, 2024
1 parent ce7bb95 commit b6a88d1
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/think/route/dispatch/Callback.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ class Callback extends Dispatch
public function exec()
{
// 执行回调方法
$vars = array_merge($this->request->param(), $this->param);
$vars = array_merge($this->request->get(), $this->param);

return $this->app->invoke($this->dispatch, $vars);
}
Expand Down
2 changes: 1 addition & 1 deletion src/think/route/dispatch/Controller.php
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ public function exec()
$action = $this->actionName . $suffix;

if (is_callable([$instance, $action])) {
$vars = $this->request->param();
$vars = array_merge($this->request->get(), $this->param);
try {
$reflect = new ReflectionMethod($instance, $action);
// 严格获取当前操作方法名
Expand Down

0 comments on commit b6a88d1

Please sign in to comment.