mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 03:18:26 +00:00
Fix errors in ConsoleShell.
The switch statement was failing to evaluate conditions properly and always attempted to run the bind command.
This commit is contained in:
parent
810fd28186
commit
1202456ef2
1 changed files with 5 additions and 6 deletions
|
@ -167,15 +167,14 @@ class ConsoleShell extends AppShell {
|
||||||
if (empty($command)) {
|
if (empty($command)) {
|
||||||
$command = trim($this->in(''));
|
$command = trim($this->in(''));
|
||||||
}
|
}
|
||||||
|
switch (true) {
|
||||||
switch ($command) {
|
case $command == 'help':
|
||||||
case 'help':
|
|
||||||
$this->help();
|
$this->help();
|
||||||
break;
|
break;
|
||||||
case 'quit':
|
case $command == 'quit':
|
||||||
case 'exit':
|
case $command == 'exit':
|
||||||
return true;
|
return true;
|
||||||
case 'models':
|
case $command == 'models':
|
||||||
$this->out(__d('cake_console', 'Model classes:'));
|
$this->out(__d('cake_console', 'Model classes:'));
|
||||||
$this->hr();
|
$this->hr();
|
||||||
foreach ($this->models as $model) {
|
foreach ($this->models as $model) {
|
||||||
|
|
Loading…
Reference in a new issue