From 10a09d53b07d710963ddfcad83c8868878d5712b Mon Sep 17 00:00:00 2001
From: Luiz Vaz <vaz.luiz@gmail.com>
Date: Mon, 16 Oct 2017 01:18:12 -0200
Subject: [PATCH] Update OciAdapter.php

Added the possibility to use another port instead of standard 1521 one.

You can use set_connections method passing array('prod' => "oci://$_user:$_pass@$_host:$_port/$_service").
It will call the PDO driver with the correct arguments without removing port info.
---
 lib/adapters/OciAdapter.php | 1 +
 1 file changed, 1 insertion(+)

diff --git a/lib/adapters/OciAdapter.php b/lib/adapters/OciAdapter.php
index 353fffefa..34267148c 100644
--- a/lib/adapters/OciAdapter.php
+++ b/lib/adapters/OciAdapter.php
@@ -22,6 +22,7 @@ protected function __construct($info)
 	{
 		try {
 			$this->dsn_params = isset($info->charset) ? ";charset=$info->charset" : "";
+			$info->host = isset($info->port) ? "$info->host:$info->port" : "$info->host";
 			$this->connection = new PDO("oci:dbname=//$info->host/$info->db$this->dsn_params",$info->user,$info->pass,static::$PDO_OPTIONS);
 		} catch (PDOException $e) {
 			throw new DatabaseException($e);