Update database.php

This commit is contained in:
FusionPBX 2024-04-27 19:29:50 -06:00 committed by GitHub
parent 0b8edef82c
commit 0c08780ca2
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 4 additions and 4 deletions

View File

@ -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;