mirror of
https://github.com/yiisoft/yii2.git
synced 2025-08-14 14:28:27 +08:00
Fixes #12807: Added console controller checks for yii\console\controllers\HelpController
This commit is contained in:

committed by
Alexander Makarov

parent
bbdf5186d2
commit
02e0ac7034
@ -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)) {
|
||||
|
Reference in New Issue
Block a user