We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 5971a56 commit ad2bcdaCopy full SHA for ad2bcda
1 file changed
lib/Database.php
@@ -31,9 +31,9 @@ private function __wakeup()
31
* @param mixed $setting - SQL connection parameters
32
* @param mixed $tag - Store the instance for later use
33
*/
34
- public static function initialize(string $vendor = null, array $setting = null, string $tag = null)
+ public static function initialize(?string $vendor = null, ?array $setting = null, ?string $tag = null)
35
{
36
- if (isset(self::$instances[$vendor]))
+ if (isset(self::$instances[$vendor]) && empty($setting) && empty($tag))
37
return \setInstance(self::$instances[$vendor]) ? self::$instances[$vendor] : false;
38
39
if (empty($vendor) || empty($setting)) {
0 commit comments