mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-25 16:27:20 +00:00
Fixed passing arguments to invokeArgs when resolving controller's action.
This commit is contained in:
parent
ea13b9f3d1
commit
a5a0ccd551
2 changed files with 10 additions and 1 deletions
|
@ -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.
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue