Compare with empty string instead of comparing length with 0

This commit is contained in:
Alexander Makarov
2015-10-10 00:37:46 +03:00
parent f83d233072
commit ffa3a59591

View File

@ -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']) {