Commit 3a5e802c by pana1990 Committed by Qiang Xue

Fix for #6463

parent 39714b89
......@@ -218,6 +218,6 @@ class Generator extends \yii\gii\Generator
public function getControllerNamespace()
{
$name = StringHelper::basename($this->controllerClass);
return ltrim(substr($this->controllerClass, 0, strlen($name) + 1), '\\');
return ltrim(substr($this->controllerClass, 0, - (strlen($name) + 1)), '\\');
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment