Use empty instead ?? because dbname is '' sometimes

Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
pull/11336/head
Daniel Kesselberg 6 years ago
parent 0ee191bf44
commit 9d7e51fd56
No known key found for this signature in database
GPG Key ID: 36E3664E099D0614

@ -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…
Cancel
Save