mirror of
https://github.com/yiisoft/yii2.git
synced 2025-11-11 19:20:01 +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 [" . $options['default'] . '] ')
|
||||||
: static::input("$text ");
|
: static::input("$text ");
|
||||||
|
|
||||||
if (!strlen($input)) {
|
if ($input === '') {
|
||||||
if (isset($options['default'])) {
|
if (isset($options['default'])) {
|
||||||
$input = $options['default'];
|
$input = $options['default'];
|
||||||
} elseif ($options['required']) {
|
} elseif ($options['required']) {
|
||||||
|
|||||||
Reference in New Issue
Block a user