Commit d4bc0d36 authored by subzero2000's avatar subzero2000

Ensure usage of Doctrine_Connection_Statement rather than PDOStatement in...

Ensure usage of Doctrine_Connection_Statement rather than PDOStatement in Doctrine_Connection::execute(). Fixes #365
parent 031b2ba7
......@@ -758,7 +758,7 @@ abstract class Doctrine_Connection extends Doctrine_Configurable implements Coun
try {
if ( ! empty($params)) {
$stmt = $this->dbh->prepare($query);
$stmt = $this->prepare($query);
$stmt->execute($params);
return $stmt;
} else {
......
......@@ -213,8 +213,7 @@ class Doctrine_Connection_Statement implements Doctrine_Adapter_Statement_Interf
*/
public function execute($params = null)
{
$event = new Doctrine_Event($this, Doctrine_Event::STMT_EXECUTE, $this->_stmt->queryString, $params);
// print $this->_stmt->queryString . print_r($params, true) . "<br>";
$event = new Doctrine_Event($this, Doctrine_Event::STMT_EXECUTE, $this->getQuery(), $params);
$this->_conn->getListener()->preExecute($event);
if ( ! $event->skipOperation) {
......@@ -257,7 +256,7 @@ class Doctrine_Connection_Statement implements Doctrine_Adapter_Statement_Interf
$cursorOrientation = Doctrine::FETCH_ORI_NEXT,
$cursorOffset = null)
{
$event = new Doctrine_Event($this, Doctrine_Event::STMT_FETCH, $this->_stmt->getQuery());
$event = new Doctrine_Event($this, Doctrine_Event::STMT_FETCH, $this->getQuery());
$event->fetchMode = $fetchMode;
$event->cursorOrientation = $cursorOrientation;
......@@ -289,7 +288,7 @@ class Doctrine_Connection_Statement implements Doctrine_Adapter_Statement_Interf
public function fetchAll($fetchMode = Doctrine::FETCH_BOTH,
$columnIndex = null)
{
$event = new Doctrine_Event($this, Doctrine_Event::STMT_FETCHALL, $this->_stmt->getQuery());
$event = new Doctrine_Event($this, Doctrine_Event::STMT_FETCHALL, $this->getQuery());
$event->fetchMode = $fetchMode;
$event->columnIndex = $columnIndex;
......
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