Fixed passing arguments to invokeArgs when resolving controller's action.

This commit is contained in:
Kamil Wylegala 2022-03-08 19:55:03 +01:00
parent ea13b9f3d1
commit a5a0ccd551
2 changed files with 10 additions and 1 deletions

View file

@ -55,6 +55,10 @@ It means that composer will look at `master` branch of repository configured und
## Changelog
### 2022-03-08
- Fixed passing `params["pass"]` argument to `invokeArgs` when resolving controller action - `array_values` used to avoid problems with named parameters.
### 2022-03-03
- Removed `String` class.

View file

@ -496,8 +496,13 @@ class Controller extends CakeObject implements CakeEventListener {
'action' => $request->params['action']
));
}
return $method->invokeArgs($this, $request->params['pass']);
return $method->invokeArgs(
$this,
is_array($request->params['pass'])
? array_values($request->params['pass'])
: []
);
} catch (ReflectionException $e) {
if ($this->scaffold !== false) {
return $this->_getScaffold($request);