From dd091c2ff3204e8ea742dbb9a066172e6edf04a8 Mon Sep 17 00:00:00 2001 From: Alexander Makarov Date: Wed, 7 Mar 2012 03:46:28 +0400 Subject: [PATCH] added check for default value --- framework/console/Command.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/framework/console/Command.php b/framework/console/Command.php index eef9035..9c6eb5d 100644 --- a/framework/console/Command.php +++ b/framework/console/Command.php @@ -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; } }