mirror of
https://github.com/yiisoft/yii2.git
synced 2025-11-02 13:02:24 +08:00
added check for default value
This commit is contained in:
@ -331,7 +331,7 @@ abstract class Command extends \yii\base\Component
|
||||
}
|
||||
else {
|
||||
$input = trim($input);
|
||||
return $input==='' ? $default : $input;
|
||||
return ($input==='' && $default!==null) ? $default : $input;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user