Skip to content

Commit

Permalink
v2.3.1 updates
Browse files Browse the repository at this point in the history
  • Loading branch information
Turan Karatug authored and Turan Karatug committed Jul 17, 2019
1 parent 1484871 commit 587d46c
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 6 deletions.
2 changes: 1 addition & 1 deletion System/Kernel/Constants.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
define('ENV', 'development');

// Framework Version
define('VERSION', '2.3.0');
define('VERSION', '2.3.1');

// Default Timezone
define('TIMEZONE', 'Europe/Istanbul');
7 changes: 4 additions & 3 deletions System/Libs/Database/DB.php
Original file line number Diff line number Diff line change
Expand Up @@ -79,9 +79,7 @@ class DB
*/
public function __construct()
{
// Getting db config items
$this->config = config('database.' . $this->con);

// Connect
$this->connect();
}

Expand All @@ -108,6 +106,9 @@ public function connection($connection)
*/
public function connect()
{
// Getting db config items
$this->config = config('database.' . $this->con);

$this->config['db_driver'] = ($this->config['db_driver']) ? $this->config['db_driver'] : 'mysql';
$this->config['db_host'] = ($this->config['db_host']) ? $this->config['db_host'] : 'localhost';
$this->config['db_charset'] = ($this->config['db_charset']) ? $this->config['db_charset'] : 'utf8';
Expand Down
4 changes: 2 additions & 2 deletions System/Libs/Http/Request.php
Original file line number Diff line number Diff line change
Expand Up @@ -308,11 +308,11 @@ public function segments()
* Get specified segment from URL
*
* @param int $index
* @return string
* @return string|null
*/
public function getSegment($index)
{
return $this->segments()[$index];
return isset($this->segments()[$index]) ? $this->segments()[$index] : null;
}

/**
Expand Down

0 comments on commit 587d46c

Please sign in to comment.