From f6b2c8f5bedd7b0f99b4bddfbd48efb15ce01251 Mon Sep 17 00:00:00 2001 From: Pavel Date: Mon, 30 Nov 2015 17:13:34 +0300 Subject: [PATCH] Fix #10217 for the case when there is hidden input combined with listview --- framework/console/Controller.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/framework/console/Controller.php b/framework/console/Controller.php index d21d3adf21..0945ea5959 100644 --- a/framework/console/Controller.php +++ b/framework/console/Controller.php @@ -88,9 +88,11 @@ class Controller extends \yii\base\Controller $default = $this->$name; if (is_array($default)) { $this->$name = preg_split('/\s*,\s*/', $value); - } else { + } elseif ($default !== null) { settype($value, gettype($default)); $this->$name = $value; + } else { + $this->$name = $value; } $this->_passedOptions[] = $name; unset($params[$name]);