Browse Source

Update database.php

FusionPBX 1 year ago
parent
commit
3b3ff8e4e7
1 changed files with 4 additions and 4 deletions
  1. 4 4
      resources/classes/database.php

+ 4 - 4
resources/classes/database.php

@@ -272,7 +272,7 @@
 			 * Singleton type class
 			 * @var database
 			 */
-			private $database;
+			private static $database;
 
 			/**
 			 * Called when the object is created
@@ -3080,9 +3080,9 @@
 		 * @see database::__construct()
 		 * @see database::connect()
 		 */
-		public static function new() {
-			if (self::$database === null)
-				self::$database = new database();
+		public static function new(array $params = []) {
+			if (self::$database === null) {
+				self::$database = new database($params);
 				self::$database->connect();
 			}
 			return self::$database;