Skip to content

Commit

Permalink
Fix errors in ConsoleShell.
Browse files Browse the repository at this point in the history
The switch statement was failing to evaluate conditions properly and
always attempted to run the bind command.
  • Loading branch information
markstory committed Aug 1, 2013
1 parent 810fd28 commit 1202456
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions lib/Cake/Console/Command/ConsoleShell.php
Expand Up @@ -167,15 +167,14 @@ public function main($command = null) {
if (empty($command)) {
$command = trim($this->in(''));
}

switch ($command) {
case 'help':
switch (true) {
case $command == 'help':
$this->help();
break;
case 'quit':
case 'exit':
case $command == 'quit':
case $command == 'exit':
return true;
case 'models':
case $command == 'models':
$this->out(__d('cake_console', 'Model classes:'));
$this->hr();
foreach ($this->models as $model) {
Expand Down

0 comments on commit 1202456

Please sign in to comment.