Browse Source
Use empty instead ?? because dbname is '' sometimes
Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
pull/11336/head
Daniel Kesselberg
7 years ago
No known key found for this signature in database
GPG Key ID: 36E3664E099D0614
1 changed files with
7 additions and
2 deletions
-
lib/private/Setup/Sqlite.php
|
|
|
@ -44,8 +44,13 @@ class Sqlite extends AbstractDatabase { |
|
|
|
* in connection factory configuration is obtained from config.php. |
|
|
|
*/ |
|
|
|
|
|
|
|
$this->dbName = $config['dbname'] ?? ConnectionFactory::DEFAULT_DBNAME; |
|
|
|
$this->tablePrefix = $config['dbtableprefix'] ?? ConnectionFactory::DEFAULT_DBTABLEPREFIX; |
|
|
|
$this->dbName = empty($config['dbname']) |
|
|
|
? ConnectionFactory::DEFAULT_DBNAME |
|
|
|
: $config['dbname']; |
|
|
|
|
|
|
|
$this->tablePrefix = empty($config['dbtableprefix']) |
|
|
|
? ConnectionFactory::DEFAULT_DBTABLEPREFIX |
|
|
|
: $config['dbtableprefix']; |
|
|
|
|
|
|
|
if ($this->dbName !== ConnectionFactory::DEFAULT_DBNAME) { |
|
|
|
$this->config->setValue('dbname', $this->dbName); |
|
|
|
|