diff --git a/cake/console/libs/bake.php b/cake/console/libs/bake.php index 52f5db6ba..74979eb56 100644 --- a/cake/console/libs/bake.php +++ b/cake/console/libs/bake.php @@ -56,9 +56,10 @@ class BakeShell extends Shell { if (isset($this->params['connection'])) { $this->{$task}->connection = $this->params['connection']; } - foreach($this->args as &$arg) { + foreach($this->args as $i => $arg) { if (strpos($arg, '.')) { - list($this->params['plugin'], $arg) = explode('.', $arg); + list($this->params['plugin'], $this->args[$i]) = explode('.', $arg); + break; } } if (isset($this->params['plugin'])) {