diff --git a/framework/base/Action.php b/framework/base/Action.php index efcc476..ec01693 100644 --- a/framework/base/Action.php +++ b/framework/base/Action.php @@ -91,7 +91,7 @@ class Action extends Component Yii::$app->requestedParams = $args; } if ($this->beforeRun()) { - $result = call_user_func_array([$this, 'run'], $args); + $result = $this->run(...$args); $this->afterRun(); return $result; diff --git a/framework/base/Component.php b/framework/base/Component.php index 49200f0..2e75dbc 100644 --- a/framework/base/Component.php +++ b/framework/base/Component.php @@ -288,7 +288,7 @@ class Component extends BaseObject $this->ensureBehaviors(); foreach ($this->_behaviors as $object) { if ($object->hasMethod($name)) { - return call_user_func_array([$object, $name], $params); + return $object->$name(...$params); } } throw new UnknownMethodException('Calling unknown method: ' . get_class($this) . "::$name()"); diff --git a/framework/base/InlineAction.php b/framework/base/InlineAction.php index b55f6b0..1e9d5ef 100644 --- a/framework/base/InlineAction.php +++ b/framework/base/InlineAction.php @@ -54,6 +54,6 @@ class InlineAction extends Action Yii::$app->requestedParams = $args; } - return call_user_func_array([$this->controller, $this->actionMethod], $args); + return $this->controller->{$this->actionMethod}(...$args); } }