mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-01-31 09:06:17 +00:00
Updating fixture task to change when CakeSchema is loaded to fix issues with errors being generated when baking new projects.
Fixes #226
This commit is contained in:
parent
7bead5df30
commit
bc26a6ab67
1 changed files with 4 additions and 3 deletions
|
@ -73,9 +73,6 @@ class FixtureTask extends Shell {
|
|||
function __construct(&$dispatch) {
|
||||
parent::__construct($dispatch);
|
||||
$this->path = $this->params['working'] . DS . 'tests' . DS . 'fixtures' . DS;
|
||||
if (!class_exists('CakeSchema')) {
|
||||
App::import('Model', 'CakeSchema', false);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -85,6 +82,10 @@ class FixtureTask extends Shell {
|
|||
* @access public
|
||||
*/
|
||||
function execute() {
|
||||
if (!class_exists('CakeSchema')) {
|
||||
App::import('Model', 'CakeSchema', false);
|
||||
}
|
||||
|
||||
if (empty($this->args)) {
|
||||
$this->__interactive();
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue