mirror of
https://github.com/yiisoft/yii2.git
synced 2025-08-26 06:15:19 +08:00
Fixes #14307: Fixed PHP warning when yii\console\UnknownCommandException
is thrown for empty command
This commit is contained in:

committed by
Alexander Makarov

parent
118aa0a581
commit
8d05e81bd4
@ -67,7 +67,7 @@ class UnknownCommandException extends Exception
|
||||
public function getSuggestedAlternatives()
|
||||
{
|
||||
$help = $this->application->createController('help');
|
||||
if ($help === false) {
|
||||
if ($help === false || $this->command === '') {
|
||||
return [];
|
||||
}
|
||||
/** @var $helpController HelpController */
|
||||
|
Reference in New Issue
Block a user