1
0
mirror of synced 2024-12-14 15:16:04 +03:00

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

This commit is contained in:
beberlei 2010-04-02 15:57:35 +00:00
parent 5b10b7098f
commit cf0a8c9727
2 changed files with 10 additions and 8 deletions

View File

@ -53,7 +53,7 @@ class OCI8Connection implements \Doctrine\DBAL\Driver\Connection
return $stmt;
}
public function quote($input)
public function quote($input, $type=\PDO::PARAM_STR)
{
return is_numeric($input) ? $input : "'$input'";
}

View File

@ -132,14 +132,16 @@ class OCI8Statement implements \Doctrine\DBAL\Driver\Statement
/**
* {@inheritdoc}
*/
public function execute($params = array())
public function execute($params = null)
{
$hasZeroIndex = isset($params[0]);
foreach ($params as $key => $val) {
if ($hasZeroIndex && is_numeric($key)) {
$this->bindValue($key + 1, $val);
} else {
$this->bindValue($key, $val);
if ($params) {
$hasZeroIndex = isset($params[0]);
foreach ($params as $key => $val) {
if ($hasZeroIndex && is_numeric($key)) {
$this->bindValue($key + 1, $val);
} else {
$this->bindValue($key, $val);
}
}
}