diff --git a/framework/CHANGELOG.md b/framework/CHANGELOG.md index 350ec0e8b0..79fdfea1d5 100644 --- a/framework/CHANGELOG.md +++ b/framework/CHANGELOG.md @@ -6,7 +6,7 @@ Yii Framework 2 Change Log - Bug #12791: Fixed `yii\behaviors\AttributeTypecastBehavior` unable to automatically detect `attributeTypes`, triggering PHP Fatal Error (klimov-paul) - Enh #12790: Added `scrollToErrorOffset` option for `ActiveForm` which adds ability to specify offset in pixels when scrolling to error (mg-code) - +- Enh #12807: Added console controller checks for `yii\console\controllers\HelpController` (schmunk42) 2.0.10 October 20, 2016 ----------------------- diff --git a/framework/console/controllers/HelpController.php b/framework/console/controllers/HelpController.php index c0505ae41e..de791dbb36 100644 --- a/framework/console/controllers/HelpController.php +++ b/framework/console/controllers/HelpController.php @@ -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)) {