Commit a1956f01 authored by Taylor Otwell's avatar Taylor Otwell

Refactor the database connector.

parent edae3915
...@@ -79,7 +79,10 @@ class Connector { ...@@ -79,7 +79,10 @@ class Connector {
{ {
$dsn = $config->driver.':host='.$config->host.';dbname='.$config->database; $dsn = $config->driver.':host='.$config->host.';dbname='.$config->database;
if (isset($config->port)) $dsn .= ';port='.$config->port; if (isset($config->port))
{
$dsn .= ';port='.$config->port;
}
$connection = new \PDO($dsn, $config->username, $config->password, $this->options); $connection = new \PDO($dsn, $config->username, $config->password, $this->options);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment