Skip to content
Snippets Groups Projects
Commit 26a4109b authored by Jared Hancock's avatar Jared Hancock
Browse files

Merge remote branch 'infoza/develop' into feature/non-standard-port

parents b63a33bb 94444d26
No related branches found
No related tags found
No related merge requests found
......@@ -40,7 +40,13 @@ function db_connect($host, $user, $passwd, $options = array()) {
//Connectr
$start = microtime(true);
if(!@$__db->real_connect($host, $user, $passwd)) # nolint
$port = 3306;
if (strpos($host, ':') !== false) {
$_host = explode(':', $host);
$host = $_host[0];
$port = (int) $_host[1];
}
if (!@$__db->real_connect($host, $user, $passwd, null, $port)) # nolint
return NULL;
//Select the database, if any.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment