1
0
mirror of https://github.com/e107inc/e107.git synced 2025-05-01 17:57:56 +02:00

Merge pull request from Jimmi08/master

Fix for   -  related to using port with mysql server
This commit is contained in:
Cameron 2016-10-12 12:39:55 -07:00 committed by GitHub
commit 35d7976c12

@ -185,13 +185,15 @@ class e_db_mysql
$this->mySQLPrefix = $mySQLPrefix;
$this->mySQLerror = false;
if(strpos($mySQLserver,':')!==false)
{
list($this->mySQLserver,$this->mySQLport) = explode(':',$mySQLserver,2);
}
if($this->pdo)
{
{
if(strpos($mySQLserver,':')!==false)
{
list($this->mySQLserver,$this->mySQLport) = explode(':',$mySQLserver,2);
}
try
{
$this->mySQLaccess = new PDO("mysql:host=".$this->mySQLserver."; port=".$this->mySQLport, $this->mySQLuser, $this->mySQLpassword, array(PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION));