Skip to content
This repository has been archived by the owner on Sep 10, 2021. It is now read-only.

Commit

Permalink
Fix strange database issue with tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Jamie Snape committed Nov 19, 2014
1 parent 7515950 commit 5a42749
Showing 1 changed file with 1 addition and 18 deletions.
19 changes: 1 addition & 18 deletions core/controllers/components/UtilityComponent.php
Original file line number Diff line number Diff line change
Expand Up @@ -444,24 +444,7 @@ public function installModule($moduleName)

try {
$configDatabase = Zend_Registry::get('configDatabase');
if (empty($configDatabase->database->params->driver_options)) {
$driverOptions = array();
} else {
$driverOptions = $configDatabase->database->params->driver_options->toArray();
}
$params = array(
'dbname' => $configDatabase->database->params->dbname,
'username' => $configDatabase->database->params->username,
'password' => $configDatabase->database->params->password,
'driver_options' => $driverOptions,
);
if (empty($configDatabase->database->params->unix_socket)) {
$params['host'] = $configDatabase->database->params->host;
$params['port'] = $configDatabase->database->params->port;
} else {
$params['unix_socket'] = $configDatabase->database->params->unix_socket;
}
$db = Zend_Db::factory($configDatabase->database->adapter, $params);
$db = Zend_Registry::get('dbAdapter');

switch ($configDatabase->database->adapter) {
case 'PDO_MYSQL':
Expand Down

0 comments on commit 5a42749

Please sign in to comment.