Skip to content

Commit

Permalink
fix unexpected database layer connnection bug for Off-Framework devel…
Browse files Browse the repository at this point in the history
…opment environments
  • Loading branch information
blogdaren committed Sep 3, 2024
1 parent dfdb29c commit 418f11e
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/Kernel/PHPCreeper.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ class PHPCreeper extends Worker
*
* @var string
*/
public const CURRENT_VERSION = '1.9.2';
public const CURRENT_VERSION = '1.9.3';

/**
* engine name
Expand Down Expand Up @@ -767,7 +767,7 @@ public function setConfig(array $config = [])

array_map(function($key)use(&$config){
if(isset($config[$key])) unset($config[$key]);
}, ['redis', 'mysql', 'lang']);
}, ['redis', 'dbo', 'lang']);

//兼容不同工作环境下的配置:未来可能会考虑重新设定一套统一的配置规格
if(!defined('USE_PHPCREEPER_APPLICATION_FRAMEWORK')){
Expand All @@ -781,9 +781,9 @@ public function setConfig(array $config = [])
Configurator::set('globalConfig/database/redis', $this->_config['redis']);
}

if(!empty($this->_config['mysql']))
if(!empty($this->_config['dbo']))
{
Configurator::set('globalConfig/database/mysql', $this->_config['mysql']);
Configurator::set('globalConfig/database/dbo', $this->_config['dbo']);
}

if(!empty($this->_config['lang']))
Expand Down

0 comments on commit 418f11e

Please sign in to comment.