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