mirror of
https://github.com/yiisoft/yii2.git
synced 2025-08-16 15:21:13 +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
@ -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
|
||||
-----------------------
|
||||
|
@ -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