mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-01-31 17:16:18 +00:00
Fixing error when no connection is specified and
bake fixture Foo is used.
This commit is contained in:
parent
37d81cb92d
commit
fd5b422357
1 changed files with 4 additions and 4 deletions
|
@ -79,11 +79,14 @@ class FixtureTask extends Shell {
|
|||
}
|
||||
|
||||
if (isset($this->args[0])) {
|
||||
if (!isset($this->connection)) {
|
||||
$this->connection = 'default';
|
||||
}
|
||||
if (strtolower($this->args[0]) == 'all') {
|
||||
return $this->all();
|
||||
}
|
||||
$model = Inflector::camelize($this->args[0]);
|
||||
return $this->bake($model);
|
||||
$this->bake($model);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -94,9 +97,6 @@ class FixtureTask extends Shell {
|
|||
* @return void
|
||||
**/
|
||||
function all() {
|
||||
if (!isset($this->connection)) {
|
||||
$this->connection = 'default';
|
||||
}
|
||||
$this->interactive = false;
|
||||
$tables = $this->Model->listAll($this->connection, false);
|
||||
foreach ($tables as $table) {
|
||||
|
|
Loading…
Add table
Reference in a new issue