Fixes #12807: Added console controller checks for yii\console\controllers\HelpController

This commit is contained in:
Tobias Munk
2016-10-23 13:02:59 +02:00
committed by Alexander Makarov
parent bbdf5186d2
commit 02e0ac7034
2 changed files with 4 additions and 4 deletions

View File

@ -90,7 +90,7 @@ class HelpController extends Controller
$description = '';
$result = Yii::$app->createController($command);
if ($result !== false) {
if ($result !== false && $result[0] instanceof Controller) {
list($controller, $actionID) = $result;
/** @var Controller $controller */
$description = $controller->getHelpSummary();
@ -188,7 +188,7 @@ class HelpController extends Controller
$len = 0;
foreach ($commands as $command => $description) {
$result = Yii::$app->createController($command);
if ($result !== false) {
if ($result !== false && $result[0] instanceof Controller) {
/** @var $controller Controller */
list($controller, $actionID) = $result;
$actions = $this->getActions($controller);
@ -215,7 +215,7 @@ class HelpController extends Controller
$this->stdout("\n");
$result = Yii::$app->createController($command);
if ($result !== false) {
if ($result !== false && $result[0] instanceof Controller) {
list($controller, $actionID) = $result;
$actions = $this->getActions($controller);
if (!empty($actions)) {