Use empty instead ?? because dbname is '' sometimes
Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
This commit is contained in:
parent
0ee191bf44
commit
9d7e51fd56
1 changed files with 7 additions and 2 deletions
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue