Commit cf0a8c97 authored by beberlei's avatar beberlei

[2.0] DDC-491 - Fix OCI8 Driver being broken

parent 5b10b709
...@@ -53,7 +53,7 @@ class OCI8Connection implements \Doctrine\DBAL\Driver\Connection ...@@ -53,7 +53,7 @@ class OCI8Connection implements \Doctrine\DBAL\Driver\Connection
return $stmt; return $stmt;
} }
public function quote($input) public function quote($input, $type=\PDO::PARAM_STR)
{ {
return is_numeric($input) ? $input : "'$input'"; return is_numeric($input) ? $input : "'$input'";
} }
......
...@@ -132,14 +132,16 @@ class OCI8Statement implements \Doctrine\DBAL\Driver\Statement ...@@ -132,14 +132,16 @@ class OCI8Statement implements \Doctrine\DBAL\Driver\Statement
/** /**
* {@inheritdoc} * {@inheritdoc}
*/ */
public function execute($params = array()) public function execute($params = null)
{ {
$hasZeroIndex = isset($params[0]); if ($params) {
foreach ($params as $key => $val) { $hasZeroIndex = isset($params[0]);
if ($hasZeroIndex && is_numeric($key)) { foreach ($params as $key => $val) {
$this->bindValue($key + 1, $val); if ($hasZeroIndex && is_numeric($key)) {
} else { $this->bindValue($key + 1, $val);
$this->bindValue($key, $val); } else {
$this->bindValue($key, $val);
}
} }
} }
......
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