Added a check to prevent the 'Set schema' query if a schema is not provided

This commit is contained in:
Maxime Rault 2018-07-11 15:42:40 +02:00
parent 35c2806fe2
commit b78b01e7cd

View File

@ -35,7 +35,7 @@ class DB2Connection extends Connection
public function __construct(PDO $pdo, $database = '', $tablePrefix = '', array $config = [])
{
parent::__construct($pdo, $database, $tablePrefix, $config);
$this->currentSchema = $this->defaultSchema = strtoupper($config['schema']);
$this->currentSchema = $this->defaultSchema = strtoupper($config['schema'] ?? null);
}
/**