diff --git a/framework/console/CConsoleCommand.php b/framework/console/CConsoleCommand.php index 0c1f65993..16e689d9e 100644 --- a/framework/console/CConsoleCommand.php +++ b/framework/console/CConsoleCommand.php @@ -229,6 +229,9 @@ abstract class CConsoleCommand extends CComponent $params=array(); // unnamed parameters foreach($args as $arg) { + if (is_null($arg)) + continue; + if(preg_match('/^--(\w+)(=(.*))?$/',$arg,$matches)) // an option { $name=$matches[1];