fix: [update] Init class before using it..

pull/5002/head
mokaddem 2019-08-14 15:22:29 +02:00
parent 5c3f2a8c80
commit 7ad60f7562
No known key found for this signature in database
GPG Key ID: 164C473F627A06FA
1 changed files with 1 additions and 1 deletions

View File

@ -228,6 +228,7 @@ class AppModel extends Model
// SQL scripts for updates
public function updateDatabase($command)
{
$this->Log = ClassRegistry::init('Log');
// Exit if updates are locked
if ($this->isUpdateLocked()) {
$this->Log->create();
@ -256,7 +257,6 @@ class AppModel extends Model
$dataSource = $dataSourceConfig['datasource'];
$sqlArray = array();
$indexArray = array();
$this->Log = ClassRegistry::init('Log');
$clean = true;
switch ($command) {
case 'extendServerOrganizationLength':