mirror of
https://github.com/yiisoft/yii2.git
synced 2025-11-03 22:32:40 +08:00
Compare with empty string instead of comparing length with 0
This commit is contained in:
@ -781,7 +781,7 @@ class BaseConsole
|
||||
? static::input("$text [" . $options['default'] . '] ')
|
||||
: static::input("$text ");
|
||||
|
||||
if (!strlen($input)) {
|
||||
if ($input === '') {
|
||||
if (isset($options['default'])) {
|
||||
$input = $options['default'];
|
||||
} elseif ($options['required']) {
|
||||
|
||||
Reference in New Issue
Block a user