Browse Source

Merge pull request #1491 from dis45927/master

Fix bug preventing mysql database creation
FusionPBX 9 years ago
parent
commit
5bc9988e73
1 changed files with 2 additions and 2 deletions
  1. 2 2
      core/install/resources/classes/install_fusionpbx.php

+ 2 - 2
core/install/resources/classes/install_fusionpbx.php

@@ -426,10 +426,10 @@ include "root.php";
 					}
 
 				//create the table, user and set the permissions only if the db_create_username was provided
-					if ($this->global_settings->db_create()) {
+					if ($this->global_settings->db_create_username()) {
 						$this->write_progress("\tCreating database");
 						try {
-							$this->dbh = new PDO($connect_string, $this->global_settings->db_create_username(), db_create_password, array(PDO::MYSQL_ATTR_INIT_COMMAND => 'SET NAMES utf8'));
+							$this->dbh = new PDO($connect_string, $this->global_settings->db_create_username(), $this->global_settings->db_create_password(), array(PDO::MYSQL_ATTR_INIT_COMMAND => 'SET NAMES utf8'));
 							$this->dbh->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
 							$this->dbh->setAttribute(PDO::ATTR_EMULATE_PREPARES, true);
 						}