From bbff6e680988a647c65c54393219b4d55239e31c Mon Sep 17 00:00:00 2001 From: Misha Date: Wed, 26 Apr 2017 17:46:16 +0300 Subject: [PATCH] Fix issue#170 --- components/AuthHelper.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/components/AuthHelper.php b/components/AuthHelper.php index 4ef8c1e2..d0a46303 100644 --- a/components/AuthHelper.php +++ b/components/AuthHelper.php @@ -350,7 +350,7 @@ private static function getControllerRoutes($module, $namespace, $prefix, &$resu $className = $namespace . Inflector::id2camel($id) . 'Controller'; if ( strpos($className, '-') === false && class_exists($className) && is_subclass_of($className, 'yii\base\Controller') ) { - $controller = new $className($prefix . $id, $module); + $controller = Yii::createObject($className, [$prefix . $id, $module]); self::getActionRoutes($controller, $result); $result[] = '/' . $controller->uniqueId . '/*'; } @@ -358,4 +358,4 @@ private static function getControllerRoutes($module, $namespace, $prefix, &$resu } } } -} \ No newline at end of file +}