Skip to content

Commit ad2bcda

Browse files
committed
corrections, missing parameter checks
bug fix: for #176
1 parent 5971a56 commit ad2bcda

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

lib/Database.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,9 @@ private function __wakeup()
3131
* @param mixed $setting - SQL connection parameters
3232
* @param mixed $tag - Store the instance for later use
3333
*/
34-
public static function initialize(string $vendor = null, array $setting = null, string $tag = null)
34+
public static function initialize(?string $vendor = null, ?array $setting = null, ?string $tag = null)
3535
{
36-
if (isset(self::$instances[$vendor]))
36+
if (isset(self::$instances[$vendor]) && empty($setting) && empty($tag))
3737
return \setInstance(self::$instances[$vendor]) ? self::$instances[$vendor] : false;
3838

3939
if (empty($vendor) || empty($setting)) {

0 commit comments

Comments
 (0)