Use empty instead ?? because dbname is '' sometimes
Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
This commit is contained in:
parent
0ee191bf44
commit
9d7e51fd56
|
@ -44,8 +44,13 @@ class Sqlite extends AbstractDatabase {
|
||||||
* in connection factory configuration is obtained from config.php.
|
* in connection factory configuration is obtained from config.php.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
$this->dbName = $config['dbname'] ?? ConnectionFactory::DEFAULT_DBNAME;
|
$this->dbName = empty($config['dbname'])
|
||||||
$this->tablePrefix = $config['dbtableprefix'] ?? ConnectionFactory::DEFAULT_DBTABLEPREFIX;
|
? ConnectionFactory::DEFAULT_DBNAME
|
||||||
|
: $config['dbname'];
|
||||||
|
|
||||||
|
$this->tablePrefix = empty($config['dbtableprefix'])
|
||||||
|
? ConnectionFactory::DEFAULT_DBTABLEPREFIX
|
||||||
|
: $config['dbtableprefix'];
|
||||||
|
|
||||||
if ($this->dbName !== ConnectionFactory::DEFAULT_DBNAME) {
|
if ($this->dbName !== ConnectionFactory::DEFAULT_DBNAME) {
|
||||||
$this->config->setValue('dbname', $this->dbName);
|
$this->config->setValue('dbname', $this->dbName);
|
||||||
|
|
Loading…
Reference in New Issue