Skip to content
This repository was archived by the owner on Sep 19, 2022. It is now read-only.

Commit 79a1b60

Browse files
Pavel Vyskočilvyskocilpavel
authored andcommitted
Set default values for some option in 'DatabaseConnector.php'
1 parent a75a1a9 commit 79a1b60

File tree

2 files changed

+7
-6
lines changed

2 files changed

+7
-6
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ All notable changes to this project will be documented in this file.
1515
- Eliminate inline javascript
1616
- All JS code was moved to 'index.js'
1717
- Using 'fetch_all' instead of 'fetch_asoc' to get data from DB
18+
- Set default values for some option in 'DatabaseConnector.php'
1819

1920
#### Fixed
2021
- Fixed the syntax of CHANGELOG

lib/Auth/Process/DatabaseConnector.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -45,18 +45,18 @@ public function __construct()
4545
{
4646
$conf = Configuration::getConfig(self::CONFIG_FILE_NAME);
4747
$this->serverName = $conf->getString(self::SERVER);
48-
$this->port = $conf->getInteger(self::PORT, null);
48+
$this->port = $conf->getInteger(self::PORT, 3306);
4949
$this->username = $conf->getString(self::USER);
5050
$this->password = $conf->getString(self::PASSWORD);
5151
$this->databaseName = $conf->getString(self::DATABASE);
5252
$this->statisticsTableName = $conf->getString(self::STATS_TABLE_NAME);
5353
$this->identityProvidersMapTableName = $conf->getString(self::IDP_MAP_TABLE_NAME);
5454
$this->serviceProvidersMapTableName = $conf->getString(self::SP_MAP_TABLE_NAME);
55-
$this->encryption = $conf->getBoolean(self::ENCRYPTION);
56-
$this->sslCA = $conf->getString(self::SSL_CA);
57-
$this->sslCert = $conf->getString(self::SSL_CERT);
58-
$this->sslKey = $conf->getString(self::SSL_KEY);
59-
$this->sslCAPath = $conf->getString(self::SSL_CA_PATH);
55+
$this->encryption = $conf->getBoolean(self::ENCRYPTION, false);
56+
$this->sslCA = $conf->getString(self::SSL_CA, '');
57+
$this->sslCert = $conf->getString(self::SSL_CERT, '');
58+
$this->sslKey = $conf->getString(self::SSL_KEY, '');
59+
$this->sslCAPath = $conf->getString(self::SSL_CA_PATH, '');
6060
}
6161

6262
public function getConnection()

0 commit comments

Comments
 (0)