Skip to content
Snippets Groups Projects
Commit 2e3c1046 authored by Demian Katz's avatar Demian Katz
Browse files

Better handling of missing Mysqli library during installation.

parent 9c2cba26
No related merge requests found
...@@ -321,9 +321,19 @@ class InstallController extends AbstractBase ...@@ -321,9 +321,19 @@ class InstallController extends AbstractBase
$connection = 'mysql://' . $view->dbrootuser . ':' $connection = 'mysql://' . $view->dbrootuser . ':'
. $this->params()->fromPost('dbrootpass') . '@' . $this->params()->fromPost('dbrootpass') . '@'
. $view->dbhost; . $view->dbhost;
$db = AdapterFactory::getAdapterFromConnectionString( try {
$connection . '/mysql' $db = AdapterFactory::getAdapterFromConnectionString(
); $connection . '/mysql'
);
} catch (\Exception $e) {
$this->flashMessenger()->setNamespace('error')
->addMessage(
'Problem initializing database adapter; '
. 'check for missing Mysqli library. Details: '
. $e->getMessage()
);
return $view;
}
try { try {
// Get SQL together // Get SQL together
$query = 'CREATE DATABASE ' . $view->dbname; $query = 'CREATE DATABASE ' . $view->dbname;
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment